Re: [PATCH v2 2/6] mm/sparse-vmemmap: support device DAX in common vmemmap path
From: Qi Zheng
Date: Sun Sep 27 2026 - 21:50:15 EST
On 9/24/26 3:52 PM, Muchun Song wrote:
The common vmemmap population path cannot yet handle optimized Device DAX
mappings on its own. It uses pfn_to_zone() to find the shared tail page,
but Device DAX populates its vmemmap at runtime before the ZONE_DEVICE span
is initialized.
Teach the common path to use device_zone() for runtime optimized vmemmap
population while retaining pfn_to_zone() for early boot. This allows the
same path to support both early boot mappings and Device DAX.
The backing PFN supplied by the Device DAX-specific population path is no
longer used, allowing the redundant lookup and population code to be
removed later.
Signed-off-by: Muchun Song <songmuchun@xxxxxxxxxxxxx>
---
v2:
- Expand comments around slab initialization to explain zone lookup and
page refcounting (suggested by Qi Zheng)
---
mm/sparse-vmemmap.c | 56 +++++++++++++++++++++++++--------------------
1 file changed, 31 insertions(+), 25 deletions(-)
Acked-by: Qi Zheng <qi.zheng@xxxxxxxxx>
Thanks,
Qi