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 9D635C77B6F for ; Wed, 12 Apr 2023 17:27:20 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0599D900002; Wed, 12 Apr 2023 13:27:20 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 009816B007E; Wed, 12 Apr 2023 13:27:19 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E1323900002; Wed, 12 Apr 2023 13:27:19 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id CF2736B007D for ; Wed, 12 Apr 2023 13:27:19 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 95EF8C017A for ; Wed, 12 Apr 2023 17:27:19 +0000 (UTC) X-FDA: 80673420198.14.3BF57B9 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf09.hostedemail.com (Postfix) with ESMTP id A2FEA14000C for ; Wed, 12 Apr 2023 17:27:17 +0000 (UTC) Authentication-Results: imf09.hostedemail.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=arm.com (policy=none); spf=pass (imf09.hostedemail.com: domain of cmarinas@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=cmarinas@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1681320437; h=from:from: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; bh=J1nO50Xks9YybRldOm+hzQ3O/JOKQ1n95MWWdaJ3ahc=; b=Alghxze9yATGeH6xsyBViGYf/hZRjAoMOpRaIR3ArM9c4YwzQxQGCyOZNQvNmOKeCE30fx 23upFiSq1Ie1aI9A7B6xl2DCvynJciSqySUwsbRddxpZaSzUVFQPeuiEpGHdyO8qVYtJEK Aaqu3eNy4mbsPMp7Aa0mgoEuSfKiNzo= ARC-Authentication-Results: i=1; imf09.hostedemail.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=arm.com (policy=none); spf=pass (imf09.hostedemail.com: domain of cmarinas@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=cmarinas@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1681320437; a=rsa-sha256; cv=none; b=TKOSAxjD/gRfkkTbDKeuf7GxRvk5FKZ98P28jpERpUfIBHyjWmc8yVqCUUNK8B7LwZGQng XqCWUuQBOnZIK4MoeZdj/gj2hia9vKIf7h9CP4Bo2Xpgk15INGJ9hDNRmuRdWXMXJk6JTs AxqxVcEVU0wOd1RkXdyLGmPcrAx1TKY= 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 7DEAC63282; Wed, 12 Apr 2023 17:27:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5DA85C433EF; Wed, 12 Apr 2023 17:27:11 +0000 (UTC) Date: Wed, 12 Apr 2023 18:27:08 +0100 From: Catalin Marinas To: Justin Forbes Cc: Mike Rapoport , Andrew Morton , Arnd Bergmann , 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-Rspamd-Queue-Id: A2FEA14000C X-Stat-Signature: ue98jdbmt97i1px3g76wbr81r4qz4hom X-Rspam-User: X-Rspamd-Server: rspam08 X-HE-Tag: 1681320437-760115 X-HE-Meta: U2FsdGVkX1+vlzKVUgIUf2h/okPSoWqvU8R2DpvrmbgnM5MCtLDTisMOS0kgzMN8kvuKVZiXwtoL/Dl0tTKf03MHkYXWhA7QEzUXb+m3kLo2N7JiHXCYcFWCfBv/4Qebe0GFKNyRkLDhBK+3YZonIZbFZT+YoLYhtR4oW+kIJ8Ufc5GNIhichnD+cD6CLfGXitWwRnubS8ijIIHUEEo/35JQneSD3/HyRIpmnv/FyNvdB2R/8d00uWV43MJkhRXe9iYYO62m4c2JsTzPxs6KcvoVE2PUz5g5g14sdutQauK6EpPOqBFdwiBwkd30BmAAn2jjTXppn74yWpN3RnmXSBJ8ofs8rRvDfjcJSgRsv/j7X1UOzNxX3qEHWRoL41bMkt/ZkWL0HhrX7SKcE8aJ1SDszDtgpl016nqgMibseYE/MCcyflh/47wfecWYz7H7qMPBPFVrvG6GaaTvzZQO4Xo0vyebgfKASxg0DjHy0zC/qLL7mqwQMVtXJxFJPE27dY8ch/z4XHQQLa2/1/SrzY+1hGDwxqD8diOvhS3xbAlzfHJM0UjNL3m1DgCzGyUWHMQEr3RN0o8kTv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k X-Loop: owner-majordomo@kvack.org List-ID: On Tue, Apr 04, 2023 at 06:50:01AM -0500, Justin Forbes wrote: > On Tue, Apr 4, 2023 at 2:22 AM Mike Rapoport wrote: > > 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. > > 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. If we remove EXPERT (as prior to this patch), I'd rather keep the ranges and avoid having to explain to people why some random MAX_ORDER doesn't build (keeping the range would also make sense for randconfig, not sure we got to any conclusion there). -- Catalin