Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Muchun Song <muchun.song@linux.dev>
To: Lance Yang <lance.yang@linux.dev>
Cc: Muchun Song <muchun.song@linux.dev>,
	songmuchun@bytedance.com, osalvador@suse.de, rppt@kernel.org,
	david@kernel.org, akpm@linux-foundation.org, qi.zheng@linux.dev,
	linux-mm@kvack.org
Subject: Re: [PATCH 1/6] mm/hugetlb_vmemmap: remove the vmemmap savings boot message
Date: Tue, 1 Dec 2026 11:17:39 +0800	[thread overview]
Message-ID: <C2906646-B8AB-43BE-BF16-A5C0F6E05DFC@linux.dev> (raw)
In-Reply-To: <20261130131947.62012-1-lance.yang@linux.dev>



> On Nov 30, 2026, at 21:19, Lance Yang <lance.yang@linux.dev> wrote:
> 
> 
> On Tue, Nov 24, 2026 at 07:05:25PM +0800, Muchun Song wrote:
>> The boot message reports the potential vmemmap savings for each HugeTLB
>> page size. It is a static estimate and does not indicate whether HVO is
>> enabled or how much vmemmap memory is actually in use.
>> 
>> Users can query vm.hugetlb_optimize_vmemmap for the HVO enable policy
>> and inspect nr_memmap_pages and nr_memmap_boot_pages in /proc/vmstat
>> for the actual vmemmap usage.
> 
> Nit: these totals include page_ext allocations too, as documented in
> mm/vmstat.c.

Yes, however, what I want to tell users is that if they want to see
how much memory is saved after enabling HVO, they can refer to the
statistics here.

> 
> /*
> * Count number of pages "struct page" and "struct page_ext" consume.
> * nr_memmap_boot_pages: # of pages allocated by boot allocator
> * nr_memmap_pages: # of pages that were allocated by buddy allocator
> */
> 
>> 
>> Remove the boot message and hugetlb_vmemmap_optimizable_size(), which is
>> only used to calculate the reported estimate.
>> 
>> Signed-off-by: Muchun Song <songmuchun@bytedance.com>
>> ---
> 
> Otherwise, with the const fix Sashiko suggested, LGTM, feel free to add:
> 
> Reviewed-by: Lance Yang <lance.yang@linux.dev>

Thanks.



  reply	other threads:[~2026-12-01  3:18 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-24 11:05 [PATCH 0/6] mm: Simplify HugeTLB vmemmap optimization code Muchun Song
2026-11-24 11:05 ` [PATCH 1/6] mm/hugetlb_vmemmap: remove the vmemmap savings boot message Muchun Song
2026-11-24 11:16   ` sashiko-bot
2026-11-24 11:18     ` Muchun Song
2026-11-30 13:13   ` nobody
2026-11-30 13:15   ` Lance
2026-11-30 13:19   ` Lance Yang
2026-12-01  3:17     ` Muchun Song [this message]
2026-11-24 11:05 ` [PATCH 2/6] mm/hugetlb_vmemmap: fold vmemmap_should_optimize() into its callers Muchun Song
2026-12-01  2:51   ` Lance Yang
2026-12-01  3:11     ` Muchun Song
2026-11-24 11:05 ` [PATCH 3/6] mm/hugetlb_vmemmap: drop the redundant hstate argument Muchun Song
2026-11-24 11:05 ` [PATCH 4/6] mm/hugetlb_vmemmap: open-code free_vmemmap_page() Muchun Song
2026-11-24 11:05 ` [PATCH 5/6] mm/hugetlb_vmemmap: drop obsolete restore refcount warning Muchun Song
2026-11-24 11:05 ` [PATCH 6/6] mm/vmemmap-optimization: centralize the vmemmap optimization support check Muchun Song

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=C2906646-B8AB-43BE-BF16-A5C0F6E05DFC@linux.dev \
    --to=muchun.song@linux.dev \
    --cc=akpm@linux-foundation.org \
    --cc=david@kernel.org \
    --cc=lance.yang@linux.dev \
    --cc=linux-mm@kvack.org \
    --cc=osalvador@suse.de \
    --cc=qi.zheng@linux.dev \
    --cc=rppt@kernel.org \
    --cc=songmuchun@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