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 X-Spam-Level: X-Spam-Status: No, score=-11.1 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, NICE_REPLY_A,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id ABC94C433E2 for ; Wed, 16 Sep 2020 02:14:00 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 26B4E206C9 for ; Wed, 16 Sep 2020 02:14:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="ne/A1+vx" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 26B4E206C9 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 9FF246B0003; Tue, 15 Sep 2020 22:13:59 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 988B76B0037; Tue, 15 Sep 2020 22:13:59 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 851D76B0055; Tue, 15 Sep 2020 22:13:59 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0151.hostedemail.com [216.40.44.151]) by kanga.kvack.org (Postfix) with ESMTP id 6CA686B0003 for ; Tue, 15 Sep 2020 22:13:59 -0400 (EDT) Received: from smtpin27.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 300CE2C7C for ; Wed, 16 Sep 2020 02:13:59 +0000 (UTC) X-FDA: 77267304198.27.spark25_020476127116 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin27.hostedemail.com (Postfix) with ESMTP id F15233D668 for ; Wed, 16 Sep 2020 02:13:58 +0000 (UTC) X-HE-Tag: spark25_020476127116 X-Filterd-Recvd-Size: 3652 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf49.hostedemail.com (Postfix) with ESMTP for ; Wed, 16 Sep 2020 02:13:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description; bh=StAcmq2hytUsdqjmMPZzvMl7oTgVOsqygfC3l3eMGYg=; b=ne/A1+vxjw6SisnO/IxVlBsGAR UvwaOJHNiWIAZ2Ja9SbQ7ug5Xh+umaia+1FZ+GYrjDBDa2eYTECk9/eYxOvNXOj2/krbCPggplFyH 6zoI8YJODm/4DsvHiCcXtWsj2zqJoUQzZ5iOU1jz752hjBVm2GCa6aw5tWO6axxiaWNMz6Y9q4vM5 DcukDeNO7ZiDn5m1XWCkxo0ESj9sLHm0Umoj5FYhAJAU5cQBu4uAQSCK772OcFh94b+1BlfM5+Oeo nHngKVHRDvkOG2SLmlTIFN3XdDLn4l7s+8ixWITt+9R8LpqrEeaUOq0QqOH7+pphICn+j2jcMfZ+/ kbwG6/EA==; Received: from [2601:1c0:6280:3f0::19c2] by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kIMxE-00027v-HD; Wed, 16 Sep 2020 02:13:52 +0000 Subject: Re: [RFC PATCH 03/24] mm/hugetlb: Introduce a new config HUGETLB_PAGE_FREE_VMEMMAP To: Muchun Song , corbet@lwn.net, mike.kravetz@oracle.com, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, x86@kernel.org, hpa@zytor.com, dave.hansen@linux.intel.com, luto@kernel.org, peterz@infradead.org, viro@zeniv.linux.org.uk, akpm@linux-foundation.org, paulmck@kernel.org, mchehab+huawei@kernel.org, pawan.kumar.gupta@linux.intel.com, oneukum@suse.com, anshuman.khandual@arm.com, jroedel@suse.de, almasrymina@google.com, rientjes@google.com Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org References: <20200915125947.26204-1-songmuchun@bytedance.com> <20200915125947.26204-4-songmuchun@bytedance.com> From: Randy Dunlap Message-ID: Date: Tue, 15 Sep 2020 19:13:46 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <20200915125947.26204-4-songmuchun@bytedance.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: F15233D668 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam03 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 9/15/20 5:59 AM, Muchun Song wrote: > The purpose of introducing HUGETLB_PAGE_FREE_VMEMMAP is to configure > whether to enable the feature of freeing unused vmemmap associated > with HugeTLB pages. > > Signed-off-by: Muchun Song > --- > fs/Kconfig | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) > > diff --git a/fs/Kconfig b/fs/Kconfig > index 976e8b9033c4..61e9c08096ca 100644 > --- a/fs/Kconfig > +++ b/fs/Kconfig > @@ -245,6 +245,21 @@ config HUGETLBFS > config HUGETLB_PAGE > def_bool HUGETLBFS > > +config HUGETLB_PAGE_FREE_VMEMMAP > + bool "Free unused vmemmap associated with HugeTLB pages" > + default n > + depends on HUGETLB_PAGE > + depends on SPARSEMEM_VMEMMAP > + depends on HAVE_BOOTMEM_INFO_NODE > + help > + There are many struct page structure associated with each HugeTLB structures > + page. But we only use a few struct page structure. In this case, structures. > + it waste some memory. It is better to free the unused struct page it wastes > + structures to buddy system which can save some memory. For > + architectures that support it, say Y here. > + > + If unsure, say N. > + > config MEMFD_CREATE > def_bool TMPFS || HUGETLBFS > > -- ~Randy