From: Andrew Morton <akpm@linux-foundation.org>
To: Muchun Song <muchun.song@linux.dev>
Cc: sashiko-reviews@lists.linux.dev,
Muchun Song <songmuchun@bytedance.com>,
Oscar Salvador <osalvador@suse.de>,
David Hildenbrand <david@kernel.org>,
Mike Rapoport <rppt@kernel.org>,
"Liam R . Howlett" <liam@infradead.org>,
Vlastimil Babka <vbabka@kernel.org>,
Michal Hocko <mhocko@suse.com>, Miaohe Lin <linmiaohe@huawei.com>,
Naoya Horiguchi <nao.horiguchi@gmail.com>,
Lance Yang <lance.yang@linux.dev>, Qi Zheng <qi.zheng@linux.dev>,
linux-mm@kvack.org, Huacai Chen <chenhuacai@kernel.org>
Subject: Re: [PATCH v2 2/3] mm/vmemmap-optimization: track optimization state in shared vmemmap pages
Date: Sun, 6 Dec 2026 09:30:11 -0800 [thread overview]
Message-ID: <20261206093011.44538dcacf32b99293eb6630@linux-foundation.org> (raw)
In-Reply-To: <15E72DA7-F9BB-4A23-BB73-C8E4D799AB43@linux.dev>
On Sun, 6 Dec 2026 17:17:09 +0800 Muchun Song <muchun.song@linux.dev> wrote:
> > [Severity: Low]
> > Should PAGEFLAG() be avoided here so folio_test_vmemmap_optimized(),
> > folio_set_vmemmap_optimized(), and folio_clear_vmemmap_optimized() are not
> > exposed?
>
> I had considered this as well. Initially, I looked for a macro that could define
> only the page helpers, but all the available macros also generate folio helpers,
> so I ended up using PAGEFLAG(). Nevertheless, I agree that PAGEFLAG() should be
> avoided here to prevent the automatically generated folio_* helpers from being
> misused in the future. I will replace it with page-only accessors in the next
> revision.
yup, my testing ended up in the same place: for an optimized folio,
folio_vmemmap_optimized() returned 1 and the generated
folio_test_vmemmap_optimized() returned 0.
Otherwise v2 tested OK here. HugeTLB boot, mapping, pool growth and
shrink, demotion, vmemmap restoration (also with injected allocation
failures), memory-failure and the deferred free path all passed with
and without the series.
next prev parent reply other threads:[~2026-12-06 17:30 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-06 8:13 [PATCH v2 0/3] mm: Track vmemmap optimization state in shared backing pages Muchun Song
2026-12-06 8:13 ` [PATCH v2 1/3] mm: move MAX_FOLIO_VMEMMAP_ALIGN to mmzone.h Muchun Song
2026-12-06 8:35 ` sashiko-bot
2026-12-06 8:40 ` Muchun Song
2026-12-06 8:13 ` [PATCH v2 2/3] mm/vmemmap-optimization: track optimization state in shared vmemmap pages Muchun Song
2026-12-06 8:35 ` sashiko-bot
2026-12-06 9:17 ` Muchun Song
2026-12-06 17:30 ` Andrew Morton [this message]
2026-12-06 8:13 ` [PATCH v2 3/3] mm/hugetlb_vmemmap: remove HPG_vmemmap_optimized 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=20261206093011.44538dcacf32b99293eb6630@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=chenhuacai@kernel.org \
--cc=david@kernel.org \
--cc=lance.yang@linux.dev \
--cc=liam@infradead.org \
--cc=linmiaohe@huawei.com \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=muchun.song@linux.dev \
--cc=nao.horiguchi@gmail.com \
--cc=osalvador@suse.de \
--cc=qi.zheng@linux.dev \
--cc=rppt@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=songmuchun@bytedance.com \
--cc=vbabka@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