Re: [PATCH 05/12] mm: hugetlb_vmemmap: unify writable vmemmap page preparation

From: Qi Zheng

Date: Sun Nov 01 2026 - 01:52:03 EST




On 10/20/26 7:58 PM, Muchun Song wrote:
Installing a writable vmemmap page requires consuming a replacement page,
copying the current contents into it and making the copy visible before
publishing the new mapping. HVO currently splits this sequence between
the page-table walker and its caller depending on the remap path.

Centralize the sequence in the walker so all writable replacements follow
the same copy-and-publish protocol. This keeps page preparation with the

This makes the copy-and-publish protocol much more solid and easier to
reason about. Nice cleanup!

mapping update and removes path-specific handling from higher-level HVO
code.

No functional change intended.

Signed-off-by: Muchun Song <songmuchun@xxxxxxxxxxxxx>
---
mm/hugetlb_vmemmap.c | 40 +++++++++++++++++-----------------------
1 file changed, 17 insertions(+), 23 deletions(-)


Reviewed-by: Qi Zheng <qi.zheng@xxxxxxxxx>

Thanks,
Qi