Message ID | 20230428153646.823736-1-jforbes@fedoraproject.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1019531vqo; Fri, 28 Apr 2023 08:41:56 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ69MMSwWEbFsGfL1C4NIQ3nGZL2K+FCAUgTkUmZw1Qzox3ph6hKxYdQMN+Ket3taLFYujKu X-Received: by 2002:a17:90b:30d0:b0:249:67ff:3ada with SMTP id hi16-20020a17090b30d000b0024967ff3adamr6005490pjb.26.1682696516648; Fri, 28 Apr 2023 08:41:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682696516; cv=none; d=google.com; s=arc-20160816; b=0h9IgfqOjQas34RJdFDw4gTwHbQxBSxqr7RsCwUUUr49auupTbLtpxNjb4J7j6xNj9 ErHMzl6PrX9R2bN7Gdu/0OYVLfZ0JFQ6mxjj6lF7MLwLQnEp02KaoxOCgWvefud9JJLm 1ORayeqSpsgl82ykX+tBHl3hH+Xurseat3eQOGQ3P9bvW9Tc8BelxQzBPJ1KwVBcBpvv OtLHtxNVFUYWYINISMTa928u15DugAN7naVfczFkt/YNkj4FewLFv4bO03bqux/hdhM7 QR6JUziuabcDcxX68BvxRc6MbP7xfE1U7Tu02mPeecaQcuyE0yZVGDPfVqjDWT5zxGHY rahw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=CyDKyhnwLuSHe3Pt1oWnnqhaliuSPXZ8kkqT+VPebrc=; b=xBb2adPFqPSikqI8me0ImerIWaarxPja9G/2vQ+L1hQ0fD8ioluBAhvpdHx4mVSuiP bvCzjub6aPyr67qfqnbdWBYCsw6D/kAHTMce7gaqKvhTqKWTs3ckEuhb4ee6wwF5hKut eF1FnYvWi+afy4Bz2b41X+JIcAW1FTA5In6qkNawZ4GXuIqYEO9qCM9YPeL53V5GxOlW zYa4E9v0OqdApRn6BgpnvHZCidunXrleanWgoxypMIloQeojtTqLELZmzMoanqyF1t5c 6ED7cXbD5ULpXrPcz7xvofhrYhsqwMbY9JGE/FmR9QY5RO8YVoXBtTMy0jb1azjJLHNq 1Uew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxtx.org header.s=google header.b=BIkkKaRp; 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=fail (p=NONE sp=NONE dis=NONE) header.from=fedoraproject.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x11-20020a17090abc8b00b00240aff612f9si23824356pjr.140.2023.04.28.08.41.42; Fri, 28 Apr 2023 08:41:56 -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=@linuxtx.org header.s=google header.b=BIkkKaRp; 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=fail (p=NONE sp=NONE dis=NONE) header.from=fedoraproject.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346285AbjD1PiN (ORCPT <rfc822;chrisjones.unixmen@gmail.com> + 99 others); Fri, 28 Apr 2023 11:38:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52604 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233422AbjD1Ph6 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 28 Apr 2023 11:37:58 -0400 Received: from mail-oa1-x32.google.com (mail-oa1-x32.google.com [IPv6:2001:4860:4864:20::32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8372261BF for <linux-kernel@vger.kernel.org>; Fri, 28 Apr 2023 08:37:34 -0700 (PDT) Received: by mail-oa1-x32.google.com with SMTP id 586e51a60fabf-187edc01fa3so54276fac.3 for <linux-kernel@vger.kernel.org>; Fri, 28 Apr 2023 08:37:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxtx.org; s=google; t=1682696253; x=1685288253; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:sender:from:to:cc:subject:date:message-id:reply-to; bh=CyDKyhnwLuSHe3Pt1oWnnqhaliuSPXZ8kkqT+VPebrc=; b=BIkkKaRpFBd3urV+vSawOBTZX0bQR+BkkO8Rd/Jc1KN8j6qLxKSPPaSXZC3n6DgAgO 3Z+RmiHURS6ePvEOciMI/4oYVrE6dBzt6/4OtSwawXyqKobp5qMnViycUzl4HjnK4ers Lm0Fi45mAn83WaArPNfo9yHfPPs3SYD58Dj0c= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682696253; x=1685288253; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:sender:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=CyDKyhnwLuSHe3Pt1oWnnqhaliuSPXZ8kkqT+VPebrc=; b=cOqj6HU6braabS15xHu7CB46ggbcblHXvSZUn5yYGdXYRjYfx7UgEiGm11yHkroc9E /UcLIkqV8Ui5ePYMcrJuiPkYFLe4mtWXIbux90T7zH2NKzxU9z5nQ+Ak9oGd9QSau/w5 jIuGIYrFwKVh0vBGVSUAVlUVHQRuXaBANGpM+FI5oC15dFim3qgxz6klrLks88RSdnFn yHF8UxcFQ+8gdlZ1/9LZnU9jJtsxYNBaeJHMG8adr17vTJYOGK5H+k9Cr4YbOzJLIc7b PCzPDKVBFmclS5cWwAi/nJGKlT0z9IrpViZVFY7trwIJX+nt2xE999cS2lTT8DP9FdGT aT3w== X-Gm-Message-State: AC+VfDxigV1bC0ApBbbhqP/y32EmVk0EyDR6bFi0PA4teYKZ3jKwVW8f aVIdYep8C9FLpXEGSKNNkkuK/iPedoulEEwhgtlcwA== X-Received: by 2002:a05:6870:a3c3:b0:187:7c2b:edc7 with SMTP id h3-20020a056870a3c300b001877c2bedc7mr2792041oak.15.1682696253315; Fri, 28 Apr 2023 08:37:33 -0700 (PDT) Received: from fedora64.linuxtx.org ([99.47.93.78]) by smtp.gmail.com with ESMTPSA id w22-20020a056870a2d600b00172428894e0sm8874479oak.28.2023.04.28.08.37.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Apr 2023 08:37:32 -0700 (PDT) Sender: Justin Forbes <jmforbes@linuxtx.org> From: "Justin M. Forbes" <jforbes@fedoraproject.org> To: Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will@kernel.org>, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: jmforbes@linuxtx.org, "Justin M. Forbes" <jforbes@fedoraproject.org> Subject: [PATCH] Revert arm64: drop ranges in definition of ARCH_FORCE_MAX_ORDER Date: Fri, 28 Apr 2023 10:36:45 -0500 Message-Id: <20230428153646.823736-1-jforbes@fedoraproject.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=no 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1764435182966236508?= X-GMAIL-MSGID: =?utf-8?q?1764435182966236508?= |
Series |
Revert arm64: drop ranges in definition of ARCH_FORCE_MAX_ORDER
|
|
Commit Message
Justin M. Forbes
April 28, 2023, 3:36 p.m. UTC
While the ARCH_FORCE_MAX_ORDER changes clarified the descriptions quite
a bit, the aarch64 specific change moved this config to sit behind
CONFIG_EXPERT. This becomes problematic when distros are setting this to
a non default value already. Pushing it behind EXPERT where it was not
before will silently change the configuration for users building with
oldconfig. If distros patch out if EXPERT downstream, it still creates
problems for users testing out upstream patches, or trying to bisect to
find the root of problem, as the configuration will change unexpectedly,
possibly leading to different behavior and false results.
Whem I asked about reverting the EXPERT, dependency, I was asked to add
the ranges back.
This essentially reverts commit 34affcd7577a232803f729d1870ba475f294e4ea
Signed-off-by: Justin M. Forbes <jforbes@fedoraproject.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
---
arch/arm64/Kconfig | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
Comments
+ Mike and Andrew On Fri, Apr 28, 2023 at 10:36:45AM -0500, Justin M. Forbes wrote: > While the ARCH_FORCE_MAX_ORDER changes clarified the descriptions quite > a bit, the aarch64 specific change moved this config to sit behind > CONFIG_EXPERT. This becomes problematic when distros are setting this to > a non default value already. Pushing it behind EXPERT where it was not > before will silently change the configuration for users building with > oldconfig. If distros patch out if EXPERT downstream, it still creates > problems for users testing out upstream patches, or trying to bisect to > find the root of problem, as the configuration will change unexpectedly, > possibly leading to different behavior and false results. > > Whem I asked about reverting the EXPERT, dependency, I was asked to add > the ranges back. > > This essentially reverts commit 34affcd7577a232803f729d1870ba475f294e4ea > > Signed-off-by: Justin M. Forbes <jforbes@fedoraproject.org> > Cc: Catalin Marinas <catalin.marinas@arm.com> > --- > arch/arm64/Kconfig | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig > index b1201d25a8a4..dae18ac01e94 100644 > --- a/arch/arm64/Kconfig > +++ b/arch/arm64/Kconfig > @@ -1516,9 +1516,11 @@ 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" if 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 page allocator limits the size of maximal physically The revert looks fine to me: Acked-by: Catalin Marinas <catalin.marinas@arm.com> For the record, the original discussion: Link: https://lore.kernel.org/r/CAFxkdAr5C7ggZ+WdvDbsfmwuXujT_z_x3qcUnhnCn-WrAurvgA@mail.gmail.com
On Fri, Apr 28, 2023 at 06:01:30PM +0100, Catalin Marinas wrote: > + Mike and Andrew > > On Fri, Apr 28, 2023 at 10:36:45AM -0500, Justin M. Forbes wrote: > > While the ARCH_FORCE_MAX_ORDER changes clarified the descriptions quite > > a bit, the aarch64 specific change moved this config to sit behind > > CONFIG_EXPERT. This becomes problematic when distros are setting this to > > a non default value already. Pushing it behind EXPERT where it was not > > before will silently change the configuration for users building with > > oldconfig. If distros patch out if EXPERT downstream, it still creates > > problems for users testing out upstream patches, or trying to bisect to > > find the root of problem, as the configuration will change unexpectedly, > > possibly leading to different behavior and false results. > > > > Whem I asked about reverting the EXPERT, dependency, I was asked to add Nit: When > > the ranges back. > > > > This essentially reverts commit 34affcd7577a232803f729d1870ba475f294e4ea > > > > Signed-off-by: Justin M. Forbes <jforbes@fedoraproject.org> > > Cc: Catalin Marinas <catalin.marinas@arm.com> > > --- > > arch/arm64/Kconfig | 4 +++- > > 1 file changed, 3 insertions(+), 1 deletion(-) > > > > diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig > > index b1201d25a8a4..dae18ac01e94 100644 > > --- a/arch/arm64/Kconfig > > +++ b/arch/arm64/Kconfig > > @@ -1516,9 +1516,11 @@ 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" if 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 page allocator limits the size of maximal physically > > The revert looks fine to me: > > Acked-by: Catalin Marinas <catalin.marinas@arm.com> > > For the record, the original discussion: > > Link: https://lore.kernel.org/r/CAFxkdAr5C7ggZ+WdvDbsfmwuXujT_z_x3qcUnhnCn-WrAurvgA@mail.gmail.com I'm not really happy about this revert because MAX_ORDER is not something that should be changed easily. But since hiding it behind EXPERT would silently change lots of existing builds, I won't object. Still, I never got the answer _why_ Fedora/RHEL configs use non-default value. Quite possible something else needs to be fixed rather than having overgrown MAX_ORDER.
On Sat, Apr 29, 2023 at 2:01 PM Mike Rapoport <rppt@kernel.org> wrote: > > On Fri, Apr 28, 2023 at 06:01:30PM +0100, Catalin Marinas wrote: > > + Mike and Andrew > > > > On Fri, Apr 28, 2023 at 10:36:45AM -0500, Justin M. Forbes wrote: > > > While the ARCH_FORCE_MAX_ORDER changes clarified the descriptions quite > > > a bit, the aarch64 specific change moved this config to sit behind > > > CONFIG_EXPERT. This becomes problematic when distros are setting this to > > > a non default value already. Pushing it behind EXPERT where it was not > > > before will silently change the configuration for users building with > > > oldconfig. If distros patch out if EXPERT downstream, it still creates > > > problems for users testing out upstream patches, or trying to bisect to > > > find the root of problem, as the configuration will change unexpectedly, > > > possibly leading to different behavior and false results. > > > > > > Whem I asked about reverting the EXPERT, dependency, I was asked to add > > Nit: When > > > > the ranges back. > > > > > > This essentially reverts commit 34affcd7577a232803f729d1870ba475f294e4ea > > > > > > Signed-off-by: Justin M. Forbes <jforbes@fedoraproject.org> > > > Cc: Catalin Marinas <catalin.marinas@arm.com> > > > --- > > > arch/arm64/Kconfig | 4 +++- > > > 1 file changed, 3 insertions(+), 1 deletion(-) > > > > > > diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig > > > index b1201d25a8a4..dae18ac01e94 100644 > > > --- a/arch/arm64/Kconfig > > > +++ b/arch/arm64/Kconfig > > > @@ -1516,9 +1516,11 @@ 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" if 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 page allocator limits the size of maximal physically > > > > The revert looks fine to me: > > > > Acked-by: Catalin Marinas <catalin.marinas@arm.com> > > > > For the record, the original discussion: > > > > Link: https://lore.kernel.org/r/CAFxkdAr5C7ggZ+WdvDbsfmwuXujT_z_x3qcUnhnCn-WrAurvgA@mail.gmail.com > > I'm not really happy about this revert because MAX_ORDER is not something > that should be changed easily. > But since hiding it behind EXPERT would silently change lots of existing > builds, I won't object. > > Still, I never got the answer _why_ Fedora/RHEL configs use non-default > value. Quite possible something else needs to be fixed rather than having > overgrown MAX_ORDER. I get that, but I also looked at the rest of the patch set. Nowhere else was "if EXPERT" added. Why wasn't it added to other architectures? Not that I am complaining, but aarch64 in particular is the one arch where, as a distro, we are trying to accommodate both Raspberry Pi, and server class machines. It is the practicality of building a single kernel image that works along a large number of machines. The defaults are fine for smaller boards, and honestly the majority of aarch64 hardware in circulation. They are not acceptable for server class machines running those types of workloads. For a long time, it was just Fedora running with 4K pages, and carrying a patch to allow MAX_ORDER to hit 13. With RHEL 9, the 4K page size became the default there as well, and they did the same. Eventually using a MAX_ORDER of 13 no longer required a patch of any kind. In an ideal world, we would be building a 4k kernel, a 64k kernel, and even a 16k kernel for users running Apple hardware, but logistically that is a whole lot more than just a kernel rebuild. It has QA cycles and support requirements that go along with it, etc. Justin > -- > Sincerely yours, > Mike. >
On Sat, Apr 29, 2023 at 05:42:11PM -0500, Justin Forbes wrote: > On Sat, Apr 29, 2023 at 2:01 PM Mike Rapoport <rppt@kernel.org> wrote: > > > > On Fri, Apr 28, 2023 at 06:01:30PM +0100, Catalin Marinas wrote: > > > + Mike and Andrew > > > > > > On Fri, Apr 28, 2023 at 10:36:45AM -0500, Justin M. Forbes wrote: > > > > While the ARCH_FORCE_MAX_ORDER changes clarified the descriptions quite > > > > a bit, the aarch64 specific change moved this config to sit behind > > > > CONFIG_EXPERT. This becomes problematic when distros are setting this to > > > > a non default value already. Pushing it behind EXPERT where it was not > > > > before will silently change the configuration for users building with > > > > oldconfig. If distros patch out if EXPERT downstream, it still creates > > > > problems for users testing out upstream patches, or trying to bisect to > > > > find the root of problem, as the configuration will change unexpectedly, > > > > possibly leading to different behavior and false results. > > > > > > > > Whem I asked about reverting the EXPERT, dependency, I was asked to add > > > > Nit: When > > > > > > the ranges back. > > > > > > > > This essentially reverts commit 34affcd7577a232803f729d1870ba475f294e4ea > > > > > > > > Signed-off-by: Justin M. Forbes <jforbes@fedoraproject.org> > > > > Cc: Catalin Marinas <catalin.marinas@arm.com> > > > > --- > > > > arch/arm64/Kconfig | 4 +++- > > > > 1 file changed, 3 insertions(+), 1 deletion(-) > > > > > > > > diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig > > > > index b1201d25a8a4..dae18ac01e94 100644 > > > > --- a/arch/arm64/Kconfig > > > > +++ b/arch/arm64/Kconfig > > > > @@ -1516,9 +1516,11 @@ 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" if 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 page allocator limits the size of maximal physically > > > > > > The revert looks fine to me: > > > > > > Acked-by: Catalin Marinas <catalin.marinas@arm.com> > > > > > > For the record, the original discussion: > > > > > > Link: https://lore.kernel.org/r/CAFxkdAr5C7ggZ+WdvDbsfmwuXujT_z_x3qcUnhnCn-WrAurvgA@mail.gmail.com > > > > I'm not really happy about this revert because MAX_ORDER is not something > > that should be changed easily. > > But since hiding it behind EXPERT would silently change lots of existing > > builds, I won't object. > > > > Still, I never got the answer _why_ Fedora/RHEL configs use non-default > > value. Quite possible something else needs to be fixed rather than having > > overgrown MAX_ORDER. > > I get that, but I also looked at the rest of the patch set. Nowhere > else was "if EXPERT" added. Why wasn't it added to other > architectures? Not that I am complaining, but aarch64 in particular is > the one arch where, as a distro, we are trying to accommodate both > Raspberry Pi, and server class machines. The patch was about dropping the ranges, not about adding EXPERT. So on arm64 it was added because Catalin requested it, other arch maintainers didn't. > It is the practicality of building a single kernel image that works > along a large number of machines. The defaults are fine for smaller > boards, and honestly the majority of aarch64 hardware in circulation. > They are not acceptable for server class machines running those types > of workloads. Why the default MAX_ORDER was not acceptable on arm64 server machines but it is fine on, say, x86 and s390? I'm not asking how you made it possible in Fedora and RHEL, I'm asking why did you switch from the default order at all. > Justin > > > -- > > Sincerely yours, > > Mike. > >
On Sat, Apr 29, 2023 at 11:02 PM Mike Rapoport <rppt@kernel.org> wrote: > > On Sat, Apr 29, 2023 at 05:42:11PM -0500, Justin Forbes wrote: > > On Sat, Apr 29, 2023 at 2:01 PM Mike Rapoport <rppt@kernel.org> wrote: > > > > > > On Fri, Apr 28, 2023 at 06:01:30PM +0100, Catalin Marinas wrote: > > > > + Mike and Andrew > > > > > > > > On Fri, Apr 28, 2023 at 10:36:45AM -0500, Justin M. Forbes wrote: > > > > > While the ARCH_FORCE_MAX_ORDER changes clarified the descriptions quite > > > > > a bit, the aarch64 specific change moved this config to sit behind > > > > > CONFIG_EXPERT. This becomes problematic when distros are setting this to > > > > > a non default value already. Pushing it behind EXPERT where it was not > > > > > before will silently change the configuration for users building with > > > > > oldconfig. If distros patch out if EXPERT downstream, it still creates > > > > > problems for users testing out upstream patches, or trying to bisect to > > > > > find the root of problem, as the configuration will change unexpectedly, > > > > > possibly leading to different behavior and false results. > > > > > > > > > > Whem I asked about reverting the EXPERT, dependency, I was asked to add > > > > > > Nit: When > > > > > > > > the ranges back. > > > > > > > > > > This essentially reverts commit 34affcd7577a232803f729d1870ba475f294e4ea > > > > > > > > > > Signed-off-by: Justin M. Forbes <jforbes@fedoraproject.org> > > > > > Cc: Catalin Marinas <catalin.marinas@arm.com> > > > > > --- > > > > > arch/arm64/Kconfig | 4 +++- > > > > > 1 file changed, 3 insertions(+), 1 deletion(-) > > > > > > > > > > diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig > > > > > index b1201d25a8a4..dae18ac01e94 100644 > > > > > --- a/arch/arm64/Kconfig > > > > > +++ b/arch/arm64/Kconfig > > > > > @@ -1516,9 +1516,11 @@ 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" if 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 page allocator limits the size of maximal physically > > > > > > > > The revert looks fine to me: > > > > > > > > Acked-by: Catalin Marinas <catalin.marinas@arm.com> > > > > > > > > For the record, the original discussion: > > > > > > > > Link: https://lore.kernel.org/r/CAFxkdAr5C7ggZ+WdvDbsfmwuXujT_z_x3qcUnhnCn-WrAurvgA@mail.gmail.com > > > > > > I'm not really happy about this revert because MAX_ORDER is not something > > > that should be changed easily. > > > But since hiding it behind EXPERT would silently change lots of existing > > > builds, I won't object. > > > > > > Still, I never got the answer _why_ Fedora/RHEL configs use non-default > > > value. Quite possible something else needs to be fixed rather than having > > > overgrown MAX_ORDER. > > > > I get that, but I also looked at the rest of the patch set. Nowhere > > else was "if EXPERT" added. Why wasn't it added to other > > architectures? Not that I am complaining, but aarch64 in particular is > > the one arch where, as a distro, we are trying to accommodate both > > Raspberry Pi, and server class machines. > > The patch was about dropping the ranges, not about adding EXPERT. So on > arm64 it was added because Catalin requested it, other arch maintainers > didn't. > > > It is the practicality of building a single kernel image that works > > along a large number of machines. The defaults are fine for smaller > > boards, and honestly the majority of aarch64 hardware in circulation. > > They are not acceptable for server class machines running those types > > of workloads. > > Why the default MAX_ORDER was not acceptable on arm64 server machines but > it is fine on, say, x86 and s390? > I'm not asking how you made it possible in Fedora and RHEL, I'm asking why > did you switch from the default order at all. Because the MAX_ORDER on aarch64 with 4K pages is more tuned to the needs of the average edge client, not so much those of a server class machine. And I get it, I would say well over 90% of the Fedora users running aarch64 are indeed running on a rPi or similar with a small memory footprint, and workloads which match that. But we do support and run a 4K page size aarch64 kernel on proper server class hardware, running typical server workloads, and RHEL has a lot more users in the server class than edge clients. RHEL could probably default to 64K pages, and most users would be happy with that. Fedora certainly could not. At some point, we may consider adding another build so that we offer both 4K and 64K pages, but for now, this is where we are, and where we have been for years. Justin > > Justin > > > > > -- > > > Sincerely yours, > > > Mike. > > > > > -- > Sincerely yours, > Mike. >
On Mon, May 01, 2023 at 04:24:38PM -0500, Justin Forbes wrote: > On Sat, Apr 29, 2023 at 11:02 PM Mike Rapoport <rppt@kernel.org> wrote: > > Why the default MAX_ORDER was not acceptable on arm64 server machines but > > it is fine on, say, x86 and s390? > > I'm not asking how you made it possible in Fedora and RHEL, I'm asking why > > did you switch from the default order at all. > > Because the MAX_ORDER on aarch64 with 4K pages is more tuned to the > needs of the average edge client, not so much those of a server class > machine. And I get it, I would say well over 90% of the Fedora users > running aarch64 are indeed running on a rPi or similar with a small > memory footprint, and workloads which match that. But we do support > and run a 4K page size aarch64 kernel on proper server class hardware, > running typical server workloads, and RHEL has a lot more users in the > server class than edge clients. RHEL could probably default to 64K > pages, and most users would be happy with that. Fedora certainly could > not. I was talking to Marc Zyngier earlier and he reckons the need for a higher MAX_ORDER is the GIC driver ITS allocation for Thunder-X. I'm happy to make ARCH_MAX_ORDER higher in defconfig (12, 13?) if CONFIG_ARCH_THUNDER. Mobile vendors won't enable this platform. Regarding EXPERT, we could drop it and do like the other architectures but we'll have randconfig occasionally hitting weird values that won't build (like -1). Not sure EXPERT helps here.
On Tue, 02 May 2023 15:07:41 +0100, Catalin Marinas <catalin.marinas@arm.com> wrote: > > On Mon, May 01, 2023 at 04:24:38PM -0500, Justin Forbes wrote: > > On Sat, Apr 29, 2023 at 11:02 PM Mike Rapoport <rppt@kernel.org> wrote: > > > Why the default MAX_ORDER was not acceptable on arm64 server machines but > > > it is fine on, say, x86 and s390? > > > I'm not asking how you made it possible in Fedora and RHEL, I'm asking why > > > did you switch from the default order at all. > > > > Because the MAX_ORDER on aarch64 with 4K pages is more tuned to the > > needs of the average edge client, not so much those of a server class > > machine. And I get it, I would say well over 90% of the Fedora users > > running aarch64 are indeed running on a rPi or similar with a small > > memory footprint, and workloads which match that. But we do support > > and run a 4K page size aarch64 kernel on proper server class hardware, > > running typical server workloads, and RHEL has a lot more users in the > > server class than edge clients. RHEL could probably default to 64K > > pages, and most users would be happy with that. Fedora certainly could > > not. > > I was talking to Marc Zyngier earlier and he reckons the need for a > higher MAX_ORDER is the GIC driver ITS allocation for Thunder-X. I'm > happy to make ARCH_MAX_ORDER higher in defconfig (12, 13?) if > CONFIG_ARCH_THUNDER. Mobile vendors won't enable this platform. In any case, I'd like to know exactly *what* requires it. The only platform I know would benefit from this is the old TX1, but this machine is more a boat anchor than a real server. M.
On Tue, May 02, 2023 at 03:21:17PM +0100, Marc Zyngier wrote: > On Tue, 02 May 2023 15:07:41 +0100, > Catalin Marinas <catalin.marinas@arm.com> wrote: > > > > On Mon, May 01, 2023 at 04:24:38PM -0500, Justin Forbes wrote: > > > On Sat, Apr 29, 2023 at 11:02 PM Mike Rapoport <rppt@kernel.org> wrote: > > > > Why the default MAX_ORDER was not acceptable on arm64 server machines but > > > > it is fine on, say, x86 and s390? > > > > I'm not asking how you made it possible in Fedora and RHEL, I'm asking why > > > > did you switch from the default order at all. > > > > > > Because the MAX_ORDER on aarch64 with 4K pages is more tuned to the > > > needs of the average edge client, not so much those of a server class > > > machine. And I get it, I would say well over 90% of the Fedora users > > > running aarch64 are indeed running on a rPi or similar with a small > > > memory footprint, and workloads which match that. But we do support > > > and run a 4K page size aarch64 kernel on proper server class hardware, > > > running typical server workloads, and RHEL has a lot more users in the > > > server class than edge clients. RHEL could probably default to 64K > > > pages, and most users would be happy with that. Fedora certainly could > > > not. The memory size of the machine or how heavy the workloads it runs have nothing to do with MAX_ORDER. Again, x86 and s390 are perfectly fine with MAX_ORDER == 10 ... > > I was talking to Marc Zyngier earlier and he reckons the need for a > > higher MAX_ORDER is the GIC driver ITS allocation for Thunder-X. ... but this indeed could be the reason to increase MAX_ORDER. > > I'm happy to make ARCH_MAX_ORDER higher in defconfig (12, 13?) if > > CONFIG_ARCH_THUNDER. Mobile vendors won't enable this platform. > > In any case, I'd like to know exactly *what* requires it. The only > platform I know would benefit from this is the old TX1, but this > machine is more a boat anchor than a real server. Yeah, if we'd knew what exactly requires such huge contiguous allocation, we probably could fix that and leave Kconfig alone.
On Tue, May 02, 2023 at 03:07:41PM +0100, Catalin Marinas wrote: > On Mon, May 01, 2023 at 04:24:38PM -0500, Justin Forbes wrote: > > Regarding EXPERT, we could drop it and do like the other architectures > but we'll have randconfig occasionally hitting weird values that won't > build (like -1). Not sure EXPERT helps here. AFAIU, randconfig does not randomize int values, it's probably random people that do ;-) > -- > Catalin
On Tue, May 02, 2023 at 07:15:20PM +0300, Mike Rapoport wrote: > On Tue, May 02, 2023 at 03:07:41PM +0100, Catalin Marinas wrote: > > On Mon, May 01, 2023 at 04:24:38PM -0500, Justin Forbes wrote: > > > > Regarding EXPERT, we could drop it and do like the other architectures > > but we'll have randconfig occasionally hitting weird values that won't > > build (like -1). Not sure EXPERT helps here. > > AFAIU, randconfig does not randomize int values, it's probably random > people that do ;-) https://lore.kernel.org/r/202303232149.Chh6KhiI-lkp@intel.com with the randconfig here: https://download.01.org/0day-ci/archive/20230323/202303232149.Chh6KhiI-lkp@intel.com/config That said, it would fail on other architectures as well, maybe they are just not wired up in the build machines.
On Tue, May 02, 2023 at 06:40:14PM +0100, Catalin Marinas wrote: > On Tue, May 02, 2023 at 07:15:20PM +0300, Mike Rapoport wrote: > > On Tue, May 02, 2023 at 03:07:41PM +0100, Catalin Marinas wrote: > > > On Mon, May 01, 2023 at 04:24:38PM -0500, Justin Forbes wrote: > > > > > > Regarding EXPERT, we could drop it and do like the other architectures > > > but we'll have randconfig occasionally hitting weird values that won't > > > build (like -1). Not sure EXPERT helps here. > > > > AFAIU, randconfig does not randomize int values, it's probably random > > people that do ;-) > > https://lore.kernel.org/r/202303232149.Chh6KhiI-lkp@intel.com > > with the randconfig here: > > https://download.01.org/0day-ci/archive/20230323/202303232149.Chh6KhiI-lkp@intel.com/config You may be right, I can't get my randconfig to set ARCH_FORCE_MAX_ORDER to anything other than the default. Maybe the kernel test robot has its own config randomisation (cc'ing lkp@intel.com). If we don't care about about this randconfig, I'm fine do drop EXPERT from current mainline, together with the 4K/16K pages condition. The condition only made sense if we kept the ranges in since these were configurable (no range for 64K). 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"
On Wed, May 03, 2023 at 11:20:40AM +0100, Catalin Marinas wrote: > On Tue, May 02, 2023 at 06:40:14PM +0100, Catalin Marinas wrote: > > On Tue, May 02, 2023 at 07:15:20PM +0300, Mike Rapoport wrote: > > > On Tue, May 02, 2023 at 03:07:41PM +0100, Catalin Marinas wrote: > > > > On Mon, May 01, 2023 at 04:24:38PM -0500, Justin Forbes wrote: > > > > > > > > Regarding EXPERT, we could drop it and do like the other architectures > > > > but we'll have randconfig occasionally hitting weird values that won't > > > > build (like -1). Not sure EXPERT helps here. > > > > > > AFAIU, randconfig does not randomize int values, it's probably random > > > people that do ;-) > > > > https://lore.kernel.org/r/202303232149.Chh6KhiI-lkp@intel.com > > > > with the randconfig here: > > > > https://download.01.org/0day-ci/archive/20230323/202303232149.Chh6KhiI-lkp@intel.com/config > > You may be right, I can't get my randconfig to set ARCH_FORCE_MAX_ORDER > to anything other than the default. Maybe the kernel test robot has its > own config randomisation (cc'ing lkp@intel.com). Really appologize here, around Mar 23 time period, there's a bug in kernel test robot code which wrongly set the value of ARCH_FORCE_MAX_ORDER to -1. We fixed it after noticing this, and replied to the false positive reports we sent out. But we missed to reply this report to point out it was invalid report. Sorry about this again, pls ignore this report. > > If we don't care about about this randconfig, I'm fine do drop EXPERT > from current mainline, together with the 4K/16K pages condition. The > condition only made sense if we kept the ranges in since these were > configurable (no range for 64K). > > 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" > > -- > Catalin
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index b1201d25a8a4..dae18ac01e94 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -1516,9 +1516,11 @@ 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" if 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 page allocator limits the size of maximal physically