Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp5599684rwl; Tue, 4 Apr 2023 00:24:43 -0700 (PDT) X-Google-Smtp-Source: AKy350Z3sw0IH89nXk4oaLgk4K4vId5x+OjmCECoWpXBtMwRncnsTPIeZ6qoGg79CncQ2fLlSGL7 X-Received: by 2002:a05:6a20:1321:b0:da:a7db:48bb with SMTP id g33-20020a056a20132100b000daa7db48bbmr1277792pzh.42.1680593083389; Tue, 04 Apr 2023 00:24:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680593083; cv=none; d=google.com; s=arc-20160816; b=FNgfn6QfkMfFxneNb8SJUVq6/eNluSYETSJJijo+OpiHinZNc6bdO1MAFuxNzaOC1D bDgZDfHzZ81nrcmZdQYZn8vMTCCCeQ5MN50uzplATabrW8Rz0jNr2dC2zLHUse/tU/ZQ nRrc9JbNIljfAjCAtmZPFuFCQptwVDMLVVlCFSoUrhJIq2BPzZX4RvMmnKV6pAyHKzKW x/VeIMfksrNcT3ixQi62nuC9wzcDOVfe5y7iZb1UERp5QfcSWcIJwFhNPt/ahykj3fGm 9UzCVoyUN5+EGTVFLSRZz36/58V9wK5+9rCiGVZ2RT/y7cCjneCYycpg1b09FVL99Ufd 3DXQ== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=ewOX4lclUYZ6lU0+Qx4rjcEuUU3cAUQFrNE+8G/H9FY=; b=YfM1zl2rkpGG1v53zMqLrP4IYopETpXf9u0TwfpKo9BcThwgJpwRKNKXCjwbS9ZPIC p1IWi+ELLVpVGtqAiiIOOeOMOXhrViytTbdF1tE5kDec3m3Q/rJOGREFbVsHfvfL4O3R Z1csORJXHBqp7t1UEFfGTThXszDJp0qZi79MLoywJrITU2J6l2vwSBXqD2O8KOiTUr7c 0InRYYEKa49g2WP0wr6DuMAkDrwoWT9eit8WmkMZPntef9ykbWRFZG6ckWEVbgJx86FX zJv5QoYohJd7FssY9J1gLebErzgx3XBtNIGuqe7khPJrhZmldnyIELhT/HmFfbutBhV9 aNXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CqHblzUj; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s11-20020aa78bcb000000b006275349409bsi7980570pfd.331.2023.04.04.00.24.31; Tue, 04 Apr 2023 00:24: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=@kernel.org header.s=k20201202 header.b=CqHblzUj; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233852AbjDDHW0 (ORCPT + 99 others); Tue, 4 Apr 2023 03:22:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233851AbjDDHWY (ORCPT ); Tue, 4 Apr 2023 03:22:24 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B63A3268B; Tue, 4 Apr 2023 00:22:20 -0700 (PDT) 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 2588A62F5C; Tue, 4 Apr 2023 07:22:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 18439C433D2; Tue, 4 Apr 2023 07:22:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680592939; bh=zNbuc2c7Q9IWg5uy9hdmHULoUQBr2Hs/BAYhilZF5F4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=CqHblzUj1z5GNNRhlVv5PjhJZbkNnPlRJpd8BNP9SFM3LozxkSRnpQ6pJHq1734IE nD0HzFbv58nu6J/EDvb0/r/dPnGTG4/RX9IFH1dtOkbIUrpX4gBAxv+iMBA5DHcRED emlRqtXMUO+8S4B3gXHGAfaZat5oK//B6B2YKi3S5Gq0z1OVXNwTRQKMwaAeo6YUWs fVidc4rMbc4aUoxxzgWhlqdgki6r0Y6O3oX30JhcakMQVSnJAF09H5rT22qPoqcLsD 1rUCPCKRgr6yla1vp2aXejTBBX5r0wagFlZzYRUY3h9pSLxjoBb/Ad/MMOzP9CoNyA E21K1u28YAOpQ== Date: Tue, 4 Apr 2023 10:22:00 +0300 From: Mike Rapoport To: Justin Forbes Cc: Andrew Morton , Arnd Bergmann , Catalin Marinas , Christophe Leroy , "David S. Miller" , Dinh Nguyen , Geert Uytterhoeven , Guo Ren , John Paul Adrian Glaubitz , "Kirill A. Shutemov" , Max Filippov , Michael Ellerman , Rich Felker , Russell King , Will Deacon , Yoshinori Sato , Zi Yan , linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org, linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mm@kvack.org, linux-sh@vger.kernel.org, linux-xtensa@linux-xtensa.org, linuxppc-dev@lists.ozlabs.org, sparclinux@vger.kernel.org Subject: Re: [PATCH v3 02/14] arm64: drop ranges in definition of ARCH_FORCE_MAX_ORDER Message-ID: References: <20230325060828.2662773-1-rppt@kernel.org> <20230325060828.2662773-3-rppt@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=unavailable 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 On Wed, Mar 29, 2023 at 10:55:37AM -0500, Justin Forbes wrote: > On Sat, Mar 25, 2023 at 1:09 AM Mike Rapoport wrote: > > > > From: "Mike Rapoport (IBM)" > > > > It is not a good idea to change fundamental parameters of core memory > > management. Having predefined ranges suggests that the values within > > those ranges are sensible, but one has to *really* understand > > implications of changing MAX_ORDER before actually amending it and > > ranges don't help here. > > > > Drop ranges in definition of ARCH_FORCE_MAX_ORDER and make its prompt > > visible only if EXPERT=y > > I do not like suddenly hiding this behind EXPERT for a couple of > reasons. Most importantly, it will silently change the config for > users building with an old kernel config. If a user has for instance > "13" set and building with 4K pages, as is the current configuration > for Fedora and RHEL aarch64 builds, an oldconfig build will now set it > to 10 with no indication that it is doing so. And while I think that > 10 is a fine default for many aarch64 users, there are valid reasons > for choosing other values. Putting this behind expert makes it much > less obvious that this is an option. That's the idea of EXPERT, no? This option was intended to allow allocation of huge pages for architectures that had PMD_ORDER > MAX_ORDER and not to allow user to select size of maximal physically contiguous allocation. Changes to MAX_ORDER fundamentally change the behaviour of core mm and unless users *really* know what they are doing there is no reason to choose non-default values so hiding this option behind EXPERT seems totally appropriate to me. > Justin > > > Acked-by: Kirill A. Shutemov > > Reviewed-by: Zi Yan > > Signed-off-by: Mike Rapoport (IBM) > > --- > > arch/arm64/Kconfig | 4 +--- > > 1 file changed, 1 insertion(+), 3 deletions(-) > > > > diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig > > index e60baf7859d1..7324032af859 100644 > > --- a/arch/arm64/Kconfig > > +++ b/arch/arm64/Kconfig > > @@ -1487,11 +1487,9 @@ config XEN > > # 16K | 27 | 14 | 13 | 11 | > > # 64K | 29 | 16 | 13 | 13 | > > config ARCH_FORCE_MAX_ORDER > > - int "Maximum zone order" if ARM64_4K_PAGES || ARM64_16K_PAGES > > + int "Maximum zone order" if EXPERT && (ARM64_4K_PAGES || ARM64_16K_PAGES) > > default "13" if ARM64_64K_PAGES > > - range 11 13 if ARM64_16K_PAGES > > default "11" if ARM64_16K_PAGES > > - range 10 15 if ARM64_4K_PAGES > > default "10" > > help > > The kernel memory allocator divides physically contiguous memory > > -- > > 2.35.1 > > > > -- Sincerely yours, Mike.