From: Barry Song <21cnbao@gmail.com>
To: Muchun Song <songmuchun@bytedance.com>
Cc: Mike Kravetz <mike.kravetz@oracle.com>,
Andrew Morton <akpm@linux-foundation.org>,
Oscar Salvador <osalvador@suse.de>,
Michal Hocko <mhocko@suse.com>,
Barry Song <song.bao.hua@hisilicon.com>,
David Hildenbrand <david@redhat.com>,
Chen Huang <chenhuang5@huawei.com>,
"Bodeddula, Balasubramaniam" <bodeddub@amazon.com>,
Jonathan Corbet <corbet@lwn.net>,
Matthew Wilcox <willy@infradead.org>,
Xiongchun duan <duanxiongchun@bytedance.com>,
fam.zheng@bytedance.com, Muchun Song <smuchun@gmail.com>,
Qi Zheng <zhengqi.arch@bytedance.com>,
linux-doc@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
Linux-MM <linux-mm@kvack.org>
Subject: Re: [PATCH v4 5/5] mm: sparsemem: move vmemmap related to HugeTLB to CONFIG_HUGETLB_PAGE_FREE_VMEMMAP
Date: Mon, 27 Sep 2021 17:38:00 +1300 [thread overview]
Message-ID: <CAGsJ_4yFbLzHoLA=7QCOvPev1w=mn4sX61+TZNn8uKkDmA9X6A@mail.gmail.com> (raw)
In-Reply-To: <20210926031339.40043-6-songmuchun@bytedance.com>
On Sun, Sep 26, 2021 at 4:15 PM Muchun Song <songmuchun@bytedance.com> wrote:
>
> The vmemmap_remap_free/alloc are relevant to HugeTLB, so move those
> functiongs to the scope of CONFIG_HUGETLB_PAGE_FREE_VMEMMAP.
>
> Signed-off-by: Muchun Song <songmuchun@bytedance.com>
Reviewed-by: Barry Song <song.bao.hua@hisilicon.com>
> ---
> include/linux/mm.h | 2 ++
> mm/sparse-vmemmap.c | 2 ++
> 2 files changed, 4 insertions(+)
>
> diff --git a/include/linux/mm.h b/include/linux/mm.h
> index 00bb2d938df4..a706e7ffda94 100644
> --- a/include/linux/mm.h
> +++ b/include/linux/mm.h
> @@ -3182,10 +3182,12 @@ static inline void print_vma_addr(char *prefix, unsigned long rip)
> }
> #endif
>
> +#ifdef CONFIG_HUGETLB_PAGE_FREE_VMEMMAP
> int vmemmap_remap_free(unsigned long start, unsigned long end,
> unsigned long reuse);
> int vmemmap_remap_alloc(unsigned long start, unsigned long end,
> unsigned long reuse, gfp_t gfp_mask);
> +#endif
>
> void *sparse_buffer_alloc(unsigned long size);
> struct page * __populate_section_memmap(unsigned long pfn,
> diff --git a/mm/sparse-vmemmap.c b/mm/sparse-vmemmap.c
> index d486a7a48512..3c7dd41c3164 100644
> --- a/mm/sparse-vmemmap.c
> +++ b/mm/sparse-vmemmap.c
> @@ -34,6 +34,7 @@
> #include <asm/pgalloc.h>
> #include <asm/tlbflush.h>
>
> +#ifdef CONFIG_HUGETLB_PAGE_FREE_VMEMMAP
> /**
> * struct vmemmap_remap_walk - walk vmemmap page table
> *
> @@ -423,6 +424,7 @@ int vmemmap_remap_alloc(unsigned long start, unsigned long end,
>
> return 0;
> }
> +#endif /* CONFIG_HUGETLB_PAGE_FREE_VMEMMAP */
>
> /*
> * Allocate a block of memory to be used to back the virtual memory map
> --
> 2.11.0
>
prev parent reply other threads:[~2021-09-27 4:38 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-26 3:13 [PATCH v4 0/5] Free the 2nd vmemmap page associated with each HugeTLB page Muchun Song
2021-09-26 3:13 ` [PATCH v4 1/5] mm: hugetlb: free " Muchun Song
2021-09-26 20:24 ` Barry Song
2021-09-28 2:42 ` Muchun Song
2021-09-26 3:13 ` [PATCH v4 2/5] mm: hugetlb: replace hugetlb_free_vmemmap_enabled with a static_key Muchun Song
2021-09-26 20:13 ` Barry Song
2021-09-26 3:13 ` [PATCH v4 3/5] mm: sparsemem: use page table lock to protect kernel pmd operations Muchun Song
2021-09-26 3:13 ` [PATCH v4 4/5] selftests: vm: add a hugetlb test case Muchun Song
2021-09-26 3:13 ` [PATCH v4 5/5] mm: sparsemem: move vmemmap related to HugeTLB to CONFIG_HUGETLB_PAGE_FREE_VMEMMAP Muchun Song
2021-09-27 4:38 ` Barry Song [this message]
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='CAGsJ_4yFbLzHoLA=7QCOvPev1w=mn4sX61+TZNn8uKkDmA9X6A@mail.gmail.com' \
--to=21cnbao@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=bodeddub@amazon.com \
--cc=chenhuang5@huawei.com \
--cc=corbet@lwn.net \
--cc=david@redhat.com \
--cc=duanxiongchun@bytedance.com \
--cc=fam.zheng@bytedance.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=mike.kravetz@oracle.com \
--cc=osalvador@suse.de \
--cc=smuchun@gmail.com \
--cc=song.bao.hua@hisilicon.com \
--cc=songmuchun@bytedance.com \
--cc=willy@infradead.org \
--cc=zhengqi.arch@bytedance.com \
/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