linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Muchun Song <songmuchun@bytedance.com>,
	will@kernel.org, akpm@linux-foundation.org, bodeddub@amazon.com,
	osalvador@suse.de, mike.kravetz@oracle.com, rientjes@google.com,
	mark.rutland@arm.com, catalin.marinas@arm.com,
	james.morse@arm.com, 21cnbao@gmail.com
Cc: linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	duanxiongchun@bytedance.com, fam.zheng@bytedance.com,
	smuchun@gmail.com
Subject: Re: [PATCH v4 1/2] mm: hugetlb_vmemmap: introduce ARCH_WANT_HUGETLB_PAGE_FREE_VMEMMAP
Date: Thu, 31 Mar 2022 10:42:11 +0200	[thread overview]
Message-ID: <6c774e27-26d2-6c45-65f9-8a5b8acd6433@redhat.com> (raw)
In-Reply-To: <20220331065640.5777-1-songmuchun@bytedance.com>

On 31.03.22 08:56, Muchun Song wrote:
> The feature of minimizing overhead of struct page associated with each
> HugeTLB page is implemented on x86_64, however, the infrastructure of
> this feature is already there, we could easily enable it for other
> architectures.  Introduce ARCH_WANT_HUGETLB_PAGE_FREE_VMEMMAP for other
> architectures to be easily enabled.  Just select this config if they
> want to enable this feature.
> 
> Suggested-by: Andrew Morton <akpm@linux-foundation.org>
> Signed-off-by: Muchun Song <songmuchun@bytedance.com>
> ---
>  arch/x86/Kconfig |  1 +
>  fs/Kconfig       | 10 +++++++++-
>  2 files changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> index 9f5bd41bf660..e69d42528542 100644
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -119,6 +119,7 @@ config X86
>  	select ARCH_WANTS_DYNAMIC_TASK_STRUCT
>  	select ARCH_WANTS_NO_INSTR
>  	select ARCH_WANT_HUGE_PMD_SHARE
> +	select ARCH_WANT_HUGETLB_PAGE_FREE_VMEMMAP	if X86_64
>  	select ARCH_WANT_LD_ORPHAN_WARN
>  	select ARCH_WANTS_THP_SWAP		if X86_64
>  	select ARCH_HAS_PARANOID_L1D_FLUSH
> diff --git a/fs/Kconfig b/fs/Kconfig
> index 6c7dc1387beb..f6db2af33738 100644
> --- a/fs/Kconfig
> +++ b/fs/Kconfig
> @@ -245,9 +245,17 @@ config HUGETLBFS
>  config HUGETLB_PAGE
>  	def_bool HUGETLBFS
>  
> +#
> +# Select this config option from the architecture Kconfig, if it is preferred
> +# to enable the feature of minimizing overhead of struct page associated with
> +# each HugeTLB page.
> +#
> +config ARCH_WANT_HUGETLB_PAGE_FREE_VMEMMAP
> +	bool
> +
>  config HUGETLB_PAGE_FREE_VMEMMAP
>  	def_bool HUGETLB_PAGE
> -	depends on X86_64
> +	depends on ARCH_WANT_HUGETLB_PAGE_FREE_VMEMMAP
>  	depends on SPARSEMEM_VMEMMAP
>  
>  config HUGETLB_PAGE_FREE_VMEMMAP_DEFAULT_ON


I think something like "HUGETLB_OPTIMIZE_VMEMMAP" might be more
expressive, but that would imply renaming the existing config knob.

Apart from that LGTM.

-- 
Thanks,

David / dhildenb



  parent reply	other threads:[~2022-03-31  8:42 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-31  6:56 Muchun Song
2022-03-31  6:56 ` [PATCH v4 2/2] arm64: mm: hugetlb: Enable HUGETLB_PAGE_FREE_VMEMMAP for arm64 Muchun Song
2022-03-31 22:31   ` Barry Song
2022-04-04  9:26   ` Anshuman Khandual
2022-04-04 12:01     ` Muchun Song
2022-04-05  3:34       ` Anshuman Khandual
2022-04-05  3:49         ` Muchun Song
2022-04-05  4:45   ` Anshuman Khandual
2022-04-05  8:38     ` Muchun Song
2022-04-11  9:17       ` Anshuman Khandual
2022-04-11 10:40         ` Muchun Song
2022-04-11 10:12   ` Anshuman Khandual
2022-04-11 11:55     ` Muchun Song
2022-04-13 10:33   ` Anshuman Khandual
2022-04-13 14:59     ` Muchun Song
2022-03-31  8:42 ` David Hildenbrand [this message]
2022-03-31  8:48   ` [PATCH v4 1/2] mm: hugetlb_vmemmap: introduce ARCH_WANT_HUGETLB_PAGE_FREE_VMEMMAP Muchun Song
2022-03-31  8:50     ` David Hildenbrand
2022-03-31  8:53       ` Muchun Song
2022-03-31 22:19 ` Barry Song
2022-04-04  9:05 ` Anshuman Khandual

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6c774e27-26d2-6c45-65f9-8a5b8acd6433@redhat.com \
    --to=david@redhat.com \
    --cc=21cnbao@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=bodeddub@amazon.com \
    --cc=catalin.marinas@arm.com \
    --cc=duanxiongchun@bytedance.com \
    --cc=fam.zheng@bytedance.com \
    --cc=james.morse@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mark.rutland@arm.com \
    --cc=mike.kravetz@oracle.com \
    --cc=osalvador@suse.de \
    --cc=rientjes@google.com \
    --cc=smuchun@gmail.com \
    --cc=songmuchun@bytedance.com \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox