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 26E5AC433FE for ; Mon, 27 Dec 2021 03:19:42 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D4B5D6B0071; Sun, 26 Dec 2021 22:19:40 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id CD17E6B0073; Sun, 26 Dec 2021 22:19:40 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A87AE6B0075; Sun, 26 Dec 2021 22:19:40 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0122.hostedemail.com [216.40.44.122]) by kanga.kvack.org (Postfix) with ESMTP id 788B16B0071 for ; Sun, 26 Dec 2021 22:19:40 -0500 (EST) Received: from smtpin23.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 34E388912E for ; Mon, 27 Dec 2021 03:19:40 +0000 (UTC) X-FDA: 78962119320.23.4112814 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf08.hostedemail.com (Postfix) with ESMTP id A531816001F for ; Mon, 27 Dec 2021 03:19:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Transfer-Encoding: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description; bh=kf/tP0+x+PcG14mcVnYZ+U9SH0RIj9hQSnEdArsxzxY=; b=MtCuALaIeb/dLfa2KTxQ3nYxYH Y9BeioyuLk7vFZqvoKiPaCBMIZHldVpK2lDdZkW7oKZuiV4RtT+fXMYMvxqaYZHL5A6XHIazkokN1 LoxDzngZY6fP1L43ItBwVLJDxggUMPYjISfHrU9fUtzlfP9Wj0Di2G/gVyQabiZG5nDHn/vD4tyGA /lUTMmb1Hq18SML0Dv+A7LwSfiAh78sHv+2X4Y9YRFxQzggC5nLcvuh6WoLBBwFaC/EmGN0GaNo8X DUPie5mUG+s0d8oeFU4QVSknrOWuJwr3IoJmja6EoxeefrxpjevLinFNSPV7VzLHrS4+DWbvmNkIu EAo2JvfQ==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1n1gXg-0076xR-GH; Mon, 27 Dec 2021 03:19:20 +0000 Date: Mon, 27 Dec 2021 03:19:20 +0000 From: Matthew Wilcox To: Kefeng Wang Cc: Christophe Leroy , Jonathan Corbet , Andrew Morton , "linuxppc-dev@lists.ozlabs.org" , "linux-doc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" , "x86@kernel.org" , "linux-arm-kernel@lists.infradead.org" , Catalin Marinas , Dave Hansen , Nicholas Piggin , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Paul Mackerras , Thomas Gleixner , Will Deacon Subject: Re: [PATCH 1/3] mm: vmalloc: Let user to control huge vmalloc default behavior Message-ID: References: <20211226083912.166512-1-wangkefeng.wang@huawei.com> <20211226083912.166512-2-wangkefeng.wang@huawei.com> <6c4bd989-268e-5899-09a7-ac573bd8b4d9@csgroup.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=MtCuALaI; dmarc=none; spf=none (imf08.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: A531816001F X-Stat-Signature: 3o3zehcio6rcry6ans7rp6oxcmx1fmfo X-HE-Tag: 1640575170-343619 Content-Transfer-Encoding: quoted-printable 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 Mon, Dec 27, 2021 at 09:44:24AM +0800, Kefeng Wang wrote: >=20 > On 2021/12/27 1:36, Christophe Leroy wrote: > >=20 > > Le 26/12/2021 =E0 09:39, Kefeng Wang a =E9crit=A0: > > > Add HUGE_VMALLOC_DEFAULT_ENABLED to let user to choose whether or > > > not enable huge vmalloc mappings by default, and this could make > > > more architectures to enable huge vmalloc mappings feature but > > > don't want to enable it by default. > > >=20 > > > Add hugevmalloc=3Don/off parameter to enable or disable this featur= e > > > at boot time, nohugevmalloc is still supported and equivalent to > > > hugevmalloc=3Doff. > >=20 > > Is there a real added value to have the user be able to select that ? > >=20 > > If the architecture supports it, is there any good reason to not use = it ? >=20 > There are some disadvantages[1],=A0 one of the main concerns is the pos= sible >=20 > memory waste, we have backported this feature to our kernel 5.10, but o= ur >=20 > downstream in our some scenario(especially in embedded), they don't wan= t >=20 > it enabled by default, and others want it, this is why patch1 comes. >=20 > >=20 > > Why not just do like PPC and enable it by default ? Why should it be > > enabled by default on PPC but disabled by default on ARM64 and X86 ? >=20 > The PPC is default enabled, we don't changes this behavior. >=20 > Maybe upstream is not care about this, as I said in cover-letter, if > arm64/x86 >=20 > don't want patch1, we could only just select config to enable it. >=20 > Let's wait for more feedback. We should not have different defaults by architecture. Either we change the default for PPC, or x86 & arm should have the same default as PPC.