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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id B87BAC6FD1D for ; Tue, 4 Apr 2023 11:58:49 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B26CA6B0071; Tue, 4 Apr 2023 07:58:48 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id AD6896B0072; Tue, 4 Apr 2023 07:58:48 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9773F6B0074; Tue, 4 Apr 2023 07:58:48 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 87F3A6B0071 for ; Tue, 4 Apr 2023 07:58:48 -0400 (EDT) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 3BDFD160162 for ; Tue, 4 Apr 2023 11:58:48 +0000 (UTC) X-FDA: 80643561936.08.2A077DD Received: from mail-ed1-f48.google.com (mail-ed1-f48.google.com [209.85.208.48]) by imf06.hostedemail.com (Postfix) with ESMTP id 21159180009 for ; Tue, 4 Apr 2023 11:58:45 +0000 (UTC) Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=linuxtx.org header.s=google header.b=QHufPu36; spf=pass (imf06.hostedemail.com: domain of jmforbes@linuxtx.org designates 209.85.208.48 as permitted sender) smtp.mailfrom=jmforbes@linuxtx.org; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=fedoraproject.org (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1680609526; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=I+C2675DfMBQc+7bmUpHmKjNV2QoW8Hg7liBbtScQEs=; b=oOqxGa2ogBlDS+E/mhRtho/+N1nh/Y16ZbOKNIT1sSygFKFe7d7CQ45t4PkBNcaZlKxDUo jQ7o4Lbik3cBiWj22+s8iQLTMUHS77I/Ko2bEHQpRP2AfoiLUsGxC7BJCdeSG8/eTh9CVI VAq4g90Gi/MXaJDmpLQYCqBXo9fE51w= ARC-Authentication-Results: i=1; imf06.hostedemail.com; dkim=pass header.d=linuxtx.org header.s=google header.b=QHufPu36; spf=pass (imf06.hostedemail.com: domain of jmforbes@linuxtx.org designates 209.85.208.48 as permitted sender) smtp.mailfrom=jmforbes@linuxtx.org; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=fedoraproject.org (policy=none) ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1680609526; a=rsa-sha256; cv=none; b=TTcwKgDda7So9ZMS3e/CKi0+yDrf7U8cma4WU66aXtufHBhf+5hwjoAgffBAqJZW3UeCba SRv5z7owdg7LY/VgLlmsl+svCK5klaZk5a9zp43vClz0N5bha4zpigDid/nji+YsSq3ftT mLlen3Tgg2EZ/Yb73qV9znw1KEDsQF0= Received: by mail-ed1-f48.google.com with SMTP id h8so129567414ede.8 for ; Tue, 04 Apr 2023 04:58:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxtx.org; s=google; t=1680609524; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:sender:from:to:cc:subject:date :message-id:reply-to; bh=I+C2675DfMBQc+7bmUpHmKjNV2QoW8Hg7liBbtScQEs=; b=QHufPu36rhsSyEcyi89z0M91InzDrPTpYug2jgsntggd9shst/zihsFVn8Y79TtEBY n6oXQ6B498D5X2aGTqtP1zNgmV7foxVIMoWK8BrfvJY//nL2v5BGO7B9GacwYa3Cs8nd fcyHpYyb5Sj7EYUQ1RHwLIK9DiHSrje0Br5SI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680609524; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=I+C2675DfMBQc+7bmUpHmKjNV2QoW8Hg7liBbtScQEs=; b=GB/+uvgM+lElTpFRmqXYWQBZ/YbdpHq6+GpysL0qgyV2wez1wDAf/KhCJpF+nH3SIq tN39b4gPuqjfU8DiboWY9m72pYa3otM/mdSoCXjCCayw9W+1TtSRmV3tbX3G/VLkv/8X s1d43dtWgzotZ0HCBk0LKcv7l0LFlV1U1ovxvfE0/oeLe86q9goNjuCV0PxKEA4NPSGK eEU9rPO9GRBr8ZBO7v0Jv0uxyZml3iWoIRsidK7SZUMRJ7Za7g3HN7wBCc35WjeDOg7m 1M7MoaHD31M13CEmre0m1UXBfpXbD0sNW15qvd2AQC8M6G9bFCgLvjFITfl9S1DKrR3m ebaQ== X-Gm-Message-State: AAQBX9e/ln4K/MWCw1h/709bRxyKFu42Ysv14QEd5S1vNhGLAn2ZKP5a 0bKzKp5nSbmDZtD0ki5spaiKBZ+Z+xtv7jrYUl2dPFGbgUw= X-Google-Smtp-Source: AKy350ZkVZQ99cK54rGRn3geRikFt9AaGgA5b5iyEMP5UW0wbDRYCg/l3sO3ZcoFyydNv/NPRkvITA== X-Received: by 2002:a17:907:2d0d:b0:932:e43f:7367 with SMTP id gs13-20020a1709072d0d00b00932e43f7367mr2136523ejc.35.1680609033815; Tue, 04 Apr 2023 04:50:33 -0700 (PDT) Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com. [209.85.128.53]) by smtp.gmail.com with ESMTPSA id h13-20020a1709066d8d00b009475bd8f441sm5882602ejt.60.2023.04.04.04.50.33 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 04 Apr 2023 04:50:33 -0700 (PDT) Received: by mail-wm1-f53.google.com with SMTP id hg25-20020a05600c539900b003f05a99a841so1947277wmb.3 for ; Tue, 04 Apr 2023 04:50:33 -0700 (PDT) X-Received: by 2002:a05:6512:38d1:b0:4e8:45d5:53cd with SMTP id p17-20020a05651238d100b004e845d553cdmr662558lft.12.1680609012911; Tue, 04 Apr 2023 04:50:12 -0700 (PDT) MIME-Version: 1.0 References: <20230325060828.2662773-1-rppt@kernel.org> <20230325060828.2662773-3-rppt@kernel.org> In-Reply-To: From: Justin Forbes Date: Tue, 4 Apr 2023 06:50:01 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3 02/14] arm64: drop ranges in definition of ARCH_FORCE_MAX_ORDER To: Mike Rapoport 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Stat-Signature: a49u1wsoizmisupyomgywjjsh9efbmus X-Rspam-User: X-Rspamd-Queue-Id: 21159180009 X-Rspamd-Server: rspam06 X-HE-Tag: 1680609525-241684 X-HE-Meta: U2FsdGVkX19zf43pMoU2NBjLsR0b1Yh5hNRMByJZ79RhAFNn9zywl7H7xI0OnD6+vnLLwl+gDlf6v8MIJp/mqZJfgcpM66ZWY2jrhZOQR7L083bAQ5Z6vst+LuQi+wYC6pe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Cu7JgmWVsTZG6+QzlnjbLBHMZX+CsbSNwyL6Ox78xzQE2vE5fP7CwWAUE13+4QGvh8BcgIgHesgvYM8Dt9NUSV9iqLIYr9VvJ9HlzzJfSY2+AlYW0bruAvJIDI8YR1jv0YNCF0vHnlG0ZMk2APrpjzd1EOzF5EZXZMHDijVgRP/2iB6UdDc8bdVZKyRFBmr38aMe8VG01E17v6858W1JY2lpMcN8rGFxPvUyu2aiGXWlHP4N31EKQ2dnupi3AZDIUPR3TuymTA1CD7Ee1QAHr9CojMKWagtnpCqHt31PZM5LeUyD1qnKguhxcJ3/BZgYtLfKEaD3Y/X45hajDxvHk8JQx0gkq16I/SnlhEfNejn6L3PLdIPs6TqJp9kTvMzqWh2Ichq8RkzryA4k4zC81CPq64Rha20i+Zm5Z5gTr2OJXSbbVq2ZOgkY80fyz9r5RktV9bk3Jx+Exzde7x8x7FteVXwJfFhBo08WQkRxXQH2NaYZ5JZUwt+tQ3KwnU4g7JGsuzWfxQnbUkW8Fp649lVQhDHk6sUDTWHKPNfHTCdBFc0Iul2h5BTA== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, Apr 4, 2023 at 2:22=E2=80=AFAM Mike Rapoport wrot= e: > > On Wed, Mar 29, 2023 at 10:55:37AM -0500, Justin Forbes wrote: > > On Sat, Mar 25, 2023 at 1:09=E2=80=AFAM 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=3Dy > > > > 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 choo= se > non-default values so hiding this option behind EXPERT seems totally > appropriate to me. It sounds nice in theory. In practice. EXPERT hides too much. When you flip expert, you expose over a 175ish new config options which are hidden behind EXPERT. You don't have to know what you are doing just with the MAX_ORDER, but a whole bunch more as well. If everyone were already running 10, this might be less of a problem. At least Fedora and RHEL are running 13 for 4K pages on aarch64. This was not some accidental choice, we had to carry a patch to even allow it for a while. If this does go in as is, we will likely just carry a patch to remove the "if EXPERT", but that is a bit of a disservice to users who might be trying to debug something else upstream, bisecting upstream kernels or testing a patch. In those cases, people tend to use pristine upstream sources without distro patches to verify, and they tend to use their existing configs. With this change, their MAX_ORDER will drop to 10 from 13 silently. That can look like a different issue enough to ruin a bisect or have them give bad feedback on a patch because it introduces a "regression" which is not a regression at all, but a config change they couldn't see. > > > 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 || ARM6= 4_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 m= emory > > > -- > > > 2.35.1 > > > > > > > > -- > Sincerely yours, > Mike. >