From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 60796C77B7D for ; Thu, 18 May 2023 16:04:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=FM2znx01/nLJ0UuK6lZL+FewtXZMLa39exh5c5KcOgc=; b=0dj+jKfCUL+D77 c0XQFTauyiFmjk7kVtkwHNu1YCVZr3GdE9Sywm8yLX/ZvjfZtLi8hEbFOyYDwVP8o0w+f8cM908Rq DwaziuTTU1GAhl5nAkzdPGh+PMfkhxdslrYA54NdVN6fyzUXRvnaXshrG+8KDdCMqh/FHK+y//Qn4 bXV1OfQZuiXDiHlEaMbPPUaWPD/a3Sbp5a3483tRatSnBAXyHMvMmzf2MHBEwGNzcHD4/z5AC4D/w 8UKOlmRlC1iXgO743f3IxLMCMoFxRuHuBS/OkfCBVWhIaWYwSQT9nSLmX1oMm/sV5hDO74YCxtXRf pS2d5mpgObAiFFUH28cA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pzg7H-00DNxC-0N; Thu, 18 May 2023 16:04:35 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pzg7E-00DNwL-1P for linux-arm-kernel@lists.infradead.org; Thu, 18 May 2023 16:04:33 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4265D65058; Thu, 18 May 2023 16:04:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8CC59C433D2; Thu, 18 May 2023 16:04:29 +0000 (UTC) Date: Thu, 18 May 2023 17:04:26 +0100 From: Catalin Marinas To: Marc Zyngier Cc: Will Deacon , linux-arm-kernel@lists.infradead.org, "Justin M . Forbes" , Mike Rapoport , Andrew Morton Subject: Re: [PATCH] arm64: Make the ARCH_FORCE_MAX_ORDER config input prompt unconditional Message-ID: References: <20230503123342.90538-1-catalin.marinas@arm.com> <86edndljkj.wl-maz@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <86edndljkj.wl-maz@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230518_090432_539035_BC64BB72 X-CRM114-Status: GOOD ( 23.82 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, May 18, 2023 at 04:56:28PM +0100, Marc Zyngier wrote: > On Wed, 03 May 2023 13:33:42 +0100, > Catalin Marinas wrote: > > diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig > > index b1201d25a8a4..1867aba83ba3 100644 > > --- a/arch/arm64/Kconfig > > +++ b/arch/arm64/Kconfig > > @@ -1516,7 +1516,7 @@ config XEN > > # 16K | 27 | 14 | 13 | 11 | > > # 64K | 29 | 16 | 13 | 13 | > > config ARCH_FORCE_MAX_ORDER > > - int "Order of maximal physically contiguous allocations" if EXPERT && (ARM64_4K_PAGES || ARM64_16K_PAGES) > > + int "Order of maximal physically contiguous allocations" > > default "13" if ARM64_64K_PAGES > > default "11" if ARM64_16K_PAGES > > default "10" > > This patch (and the previous one) has the unfortunate side effect of > completely breaking a change of page size (from 4k to 16k, for > example): > > > maz@valley-girl:~/hot-poop/arm-platforms$ make defconfig > *** Default configuration is based on 'defconfig' > # > # configuration written to .config > # > maz@valley-girl:~/hot-poop/arm-platforms$ egrep 'PAGE_SHIFT|MAX_ORDER' .config > CONFIG_ARM64_PAGE_SHIFT=12 > CONFIG_ARCH_FORCE_MAX_ORDER=10 > maz@valley-girl:~/hot-poop/arm-platforms$ make menuconfig > configuration written to .config > > *** End of the configuration. > *** Execute 'make' to start the build or try 'make help'. > > maz@valley-girl:~/hot-poop/arm-platforms$ egrep 'PAGE_SHIFT|MAX_ORDER' .config > CONFIG_ARM64_PAGE_SHIFT=14 > CONFIG_ARCH_FORCE_MAX_ORDER=10 > > > The build then fails in ways that aren't obvious (BUILD_BUG in the THP > code). It would much better if the result of the configuration tool > would produce something that can actually build. Thanks Marc for reporting this. The main culprit is the removal of the ranges, so MAX_ORDER stays at 10 when changing the page size, but only with EXPERT enabled. With this patch, it just generalises the problem even without EXPERT. So we either re-introduce the ranges or we drop the menuconfig entry completely, regardless of EXPERT. I'm inclined to go with the latter, just don't allow people to redefine this (still unclear to me if we need a higher default with 4K pages). -- Catalin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel