Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp4309759rwd; Tue, 30 May 2023 03:41:44 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7s133mEG34VYe1VQ/RM93xcpIPeVJW5YZSYlC+cJn7V45NRKRJPHhBTI6Aeg+xLoHgx7k9 X-Received: by 2002:a05:6a20:430b:b0:10c:dd4f:faa7 with SMTP id h11-20020a056a20430b00b0010cdd4ffaa7mr2269575pzk.1.1685443303931; Tue, 30 May 2023 03:41:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685443303; cv=none; d=google.com; s=arc-20160816; b=JmFJqGwoiWwl7pIUO5lTyZkgeR7CR30JIQveXEgj2atnJEb+dWMcelgFVzbUpfEPPa JihWy3Mlr1/uQuA8X4TJamqXAjbmR3jgrjQZmJoss8JYtPo1siR4MlqAQUlKlu/LciTM laDl0COpWPp5lsBax0kvxG6XTtTzjJVmOE1q0hz3TsPbJBtespgfdNEXb10KQNsUhOuM b8VY3LX1nkTBPuzb2t5bol6SqQccyZFOrx+HYxYDa3AP/TNHkAANYgIE/Ly1QaScccb8 tFksTXrZqNIuECQ/fh6RALLYye9ZpmU3NpxvULDqlue/5VYEsmFMkfm9B0kWLCXHKGju wtGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=IA3Es24DS2noFq8NtDW84dyQLJj/T/A2t7vmv/IPevA=; b=d/OWkSRrHGWyXf5Lj0+KPO7iG+CJetJEa1+trnZz3MBF6nF6VrugI/nUacm/usUXLM vkVzhPWHZaASO5O8X01UGfB+/d0m4csciD6CPJlBpZxGbESNay6iKBbAmkLVbQs3goQG IQD1sYHHHdEmKQgXnadBt2HGu+8GVZ9wfJlu3L8PyAK+dSGHNvVP7dJW76WeiSen5vob vMCkdvCSNGneMquiuMAlodVh66eotT4XstgZLSW7hysJwPgM2z0VEwqKcL3DbsGz0MfH hXdOxXwybNOWPdBEXPBLdawuMXQmKoSVT+TNN0xpY90gqQsAmI9ILJdYAoimr19fxjpD c+7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=x8C4TkzY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c17-20020a637251000000b0050beb3fe627si10418239pgn.459.2023.05.30.03.41.32; Tue, 30 May 2023 03:41:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=x8C4TkzY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230146AbjE3Kef (ORCPT + 99 others); Tue, 30 May 2023 06:34:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33386 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229558AbjE3Kee (ORCPT ); Tue, 30 May 2023 06:34:34 -0400 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9499D93 for ; Tue, 30 May 2023 03:34:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1685442872; x=1716978872; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=Ezs7z46coeL8J/2z7XFwZEbihsgUQ3C+uMt9D0ovWjQ=; b=x8C4TkzYXd2HfNPWOhDiytb5pBO5s8CZhKR02mVwrg8X5jnQ9HkCz6K6 H/3hgEUiAh8setLoH7jv+NKCB13wgKP1qCMarlplCKN8dO85yYtrRakRP 8/qiauZfGU2G1aoMVrRG8nFwfBf1ix440NGustNux5g7dVnx892Nc69Uc xPoihb7qMVie7DaER+YO7Edc9lcE2FZyZI8dNbviGd7oTn7GEPp8ddA/o 7d+bN4MuTAV8keIWWRx+9RBCBBdC7DSZaMkEGVYkGuvZPtn+rXBt15nyN +uACXEre6vAf0pUBmlvHsa77kwy17gtQCIAxyQqDD1iYCB2ASxc2M8L95 g==; X-IronPort-AV: E=Sophos;i="6.00,204,1681196400"; d="asc'?scan'208";a="154575603" X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa6.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 30 May 2023 03:34:31 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.87.72) by chn-vm-ex02.mchp-main.com (10.10.87.72) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Tue, 30 May 2023 03:34:30 -0700 Received: from wendy (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21 via Frontend Transport; Tue, 30 May 2023 03:34:29 -0700 Date: Tue, 30 May 2023 11:34:06 +0100 From: Conor Dooley To: Catalin Marinas CC: Jisheng Zhang , Paul Walmsley , Palmer Dabbelt , Albert Ou , , Subject: Re: [PATCH 5/6] riscv: allow kmalloc() caches aligned to the smallest value Message-ID: <20230530-gyration-handheld-ef4e44e89d61@wendy> References: <20230526165958.908-1-jszhang@kernel.org> <20230526165958.908-6-jszhang@kernel.org> <20230529-fidelity-booted-0d4055d1f559@wendy> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="yLd8GXUEZrWQsGZ1" Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --yLd8GXUEZrWQsGZ1 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, May 30, 2023 at 10:59:41AM +0100, Catalin Marinas wrote: > On Mon, May 29, 2023 at 12:17:46PM +0100, Conor Dooley wrote: > > On Sat, May 27, 2023 at 12:59:57AM +0800, Jisheng Zhang wrote: > > > After this patch, a simple test of booting to a small buildroot rootfs > > > on qemu shows: > > >=20 > > > kmalloc-96 5041 5041 96 ... > > > kmalloc-64 9606 9606 64 ... > > > kmalloc-32 5128 5128 32 ... > > > kmalloc-16 7682 7682 16 ... > > > kmalloc-8 10246 10246 8 ... > > >=20 > > > So we save about 1268KB memory. The saving will be much larger in nor= mal > > > OS env on real HW platforms. > > >=20 > > > [1] Link: https://lore.kernel.org/linux-arm-kernel/20230524171904.396= 7031-1-catalin.marinas@arm.com/ While I think of it, Link: goes at the start of the line, the [1] should go at the end (although I don't think you actually reference the link anywhere in the text & it'll probably not be particularly relevant if a subsequent revision of that patchset is applied. > > >=20 > > > Signed-off-by: Jisheng Zhang > >=20 > > Fails to build chief, with loads of: > > linux/dma-mapping.h:546:19: error: redefinition of 'dma_get_cache_align= ment' > >=20 > > And for 32-bit there's also a rake of: > > include/linux/slab.h:239:9: warning: 'ARCH_KMALLOC_MINALIGN' macro rede= fined [-Wmacro-redefined] > >=20 > > At the very least, reproducable with rv32_defconfig. >=20 > Have you this it on top of the KMALLOC_MINALIGN preparation series? >=20 > https://lore.kernel.org/r/20230524171904.3967031-1-catalin.marinas@arm.co= m/ Oh, no. Thanks for pointing that out. Our automation stuff only uses what is in riscv/{for-next,master,fixes}. Unless my reading comprehension is particularly bad of late it was non-obvious that this depended on something that had not yet been applied - it sounded like your series had already been merged last year. Apologies for the noise then on this patch, but please try to be more clear about what the dependencies actually are Jisheng. Cheers, Conor. --yLd8GXUEZrWQsGZ1 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZHXRHgAKCRB4tDGHoIJi 0m9uAP9AoI+JEAqv+9RR/YOu/MvDnbTegsXBk/n2SwQtBMLLUwEA8FMW1zWGymoE agKX1i07+HwjlUVKA0zZWmUkNoUpXQU= =N2cE -----END PGP SIGNATURE----- --yLd8GXUEZrWQsGZ1--