> On Sep 8, 2026, at 15:46, Qi Zheng <[email protected]> wrote:
> 
> 
> 
> On 9/8/26 11:03 AM, Muchun Song wrote:
>> HugeTLB vmemmap optimization now uses per-zone shared tail vmemmap pages.
>> Device DAX has not been switched to that mechanism yet.
>> Switch device DAX to vmemmap_shared_tail_page() as well. This aligns DAX
>> with HugeTLB by using the common per-zone shared tail vmemmap page.
>> The optimization is enabled only for DEV-DAX through pgmap->vmemmap_shift,
>> which is assigned when a DEV-DAX device is initialized. Unlike FS-DAX,
>> DEV-DAX does not modify tail struct pages, so sharing them is safe.
> 
> Got it — adding this description makes things significantly clearer.

Aha, also makes Sashiko happy. This time, it is no longer confused
with FS-DAX.

> 
>> Since the shared tail page can now back ZONE_DEVICE vmemmap mappings,
>> initialize its entries with PG_reserved for device zones. Also skip
>> poisoning vmemmap-optimizable sections while their struct pages may be
>> shared.
>> Signed-off-by: Muchun Song <[email protected]>
>> ---
>> v2:
>> - Explain why sharing tail vmemmap pages is safe for DEV-DAX
>>   (suggested by Qi Zheng)
>> ---
>>  include/linux/mmzone.h | 10 +++++++++
>>  mm/memory_hotplug.c    |  5 +++--
>>  mm/sparse-vmemmap.c    | 47 ++++++++++++++----------------------------
>>  3 files changed, 28 insertions(+), 34 deletions(-)
> 
> Acked-by: Qi Zheng <[email protected]>

Thanks.

> 
> Thanks,
> Qi



Reply via email to