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 3AD09C433F5 for ; Mon, 27 Dec 2021 06:15:02 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3AAB76B0071; Mon, 27 Dec 2021 01:15:01 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 333A96B0072; Mon, 27 Dec 2021 01:15:01 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1D3EF6B0073; Mon, 27 Dec 2021 01:15:01 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0224.hostedemail.com [216.40.44.224]) by kanga.kvack.org (Postfix) with ESMTP id 08DFE6B0071 for ; Mon, 27 Dec 2021 01:15:01 -0500 (EST) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 94159181AC9C6 for ; Mon, 27 Dec 2021 06:15:00 +0000 (UTC) X-FDA: 78962561160.06.56AB030 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by imf30.hostedemail.com (Postfix) with ESMTP id 6E2288001D for ; Mon, 27 Dec 2021 06:14:59 +0000 (UTC) Received: from dggpemm500023.china.huawei.com (unknown [172.30.72.53]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4JMnQ52V9xz8w5Q; Mon, 27 Dec 2021 14:12:29 +0800 (CST) Received: from dggpemm500001.china.huawei.com (7.185.36.107) by dggpemm500023.china.huawei.com (7.185.36.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Mon, 27 Dec 2021 14:14:54 +0800 Received: from [10.174.177.243] (10.174.177.243) by dggpemm500001.china.huawei.com (7.185.36.107) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2308.20; Mon, 27 Dec 2021 14:14:53 +0800 Message-ID: Date: Mon, 27 Dec 2021 14:14:53 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 Subject: Re: [PATCH 1/3] mm: vmalloc: Let user to control huge vmalloc default behavior Content-Language: en-US To: Matthew Wilcox 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 References: <20211226083912.166512-1-wangkefeng.wang@huawei.com> <20211226083912.166512-2-wangkefeng.wang@huawei.com> <6c4bd989-268e-5899-09a7-ac573bd8b4d9@csgroup.eu> From: Kefeng Wang In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed X-Originating-IP: [10.174.177.243] X-ClientProxiedBy: dggeme707-chm.china.huawei.com (10.1.199.103) To dggpemm500001.china.huawei.com (7.185.36.107) X-CFilter-Loop: Reflected X-Rspamd-Queue-Id: 6E2288001D X-Stat-Signature: i785y7mtndobmm34ty3oyxm1f3ac3hmj Authentication-Results: imf30.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf30.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.189 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com X-Rspamd-Server: rspam11 X-HE-Tag: 1640585699-524620 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 2021/12/27 11:19, Matthew Wilcox wrote: > On Mon, Dec 27, 2021 at 09:44:24AM +0800, Kefeng Wang wrote: >> On 2021/12/27 1:36, Christophe Leroy wrote: >>> Le 26/12/2021 =C3=A0 09:39, Kefeng Wang a =C3=A9crit=C2=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. >>>> >>>> Add hugevmalloc=3Don/off parameter to enable or disable this feature >>>> at boot time, nohugevmalloc is still supported and equivalent to >>>> hugevmalloc=3Doff. >>> Is there a real added value to have the user be able to select that ? >>> >>> If the architecture supports it, is there any good reason to not use = it ? >> There are some disadvantages[1],=C2=A0 one of the main concerns is the= possible >> >> memory waste, we have backported this feature to our kernel 5.10, but = our >> >> downstream in our some scenario(especially in embedded), they don't wa= nt >> >> it enabled by default, and others want it, this is why patch1 comes. >> >>> 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 ? >> The PPC is default enabled, we don't changes this behavior. >> >> Maybe upstream is not care about this, as I said in cover-letter, if >> arm64/x86 >> >> don't want patch1, we could only just select config to enable it. >> >> Let's wait for more feedback. > We should not have different defaults by architecture. Either we chang= e > the default for PPC, or x86 & arm should have the same default as PPC. Ok, since HUGE_VMALLOC_DEFAULT_ENABLED is introduced, we could make it default y, not only select it on PPC, then the ppc/arm64/x86 have same=20 default value. And if someone don't want it, they could not enable this config. Meanwhile hugevmalloc=3Don/off to make this feature to enable/disable at=20 boot time. I will add some explanation and resend it, thanks. > .