Re: [PATCH 05/11] mm/sparse-vmemmap: set section order for device DAX

From: Qi Zheng

Date: Sat Sep 05 2026 - 04:24:01 EST


Hi Muchun,

On 8/31/26 3:53 PM, Muchun Song wrote:
Device DAX can use vmemmap optimization only when a full section is
populated with a compound-page geometry. Record that geometry in the
section order before populating the section, so later vmemmap accounting
and population decisions can use the section state directly.

Clear the section order when the section becomes empty again. Also reject
partial additions to a section that already has optimized vmemmap mappings,
because a section cannot safely mix optimized and ordinary vmemmap layouts.

Perhaps we should explain why they cannot be safely mixed.


Partial additions continue to use ordinary vmemmap population, so they do
not save vmemmap memory. Such additions are uncommon, and the lost saving
is negligible.

Signed-off-by: Muchun Song <songmuchun@xxxxxxxxxxxxx>
---
mm/mm_init.c | 13 ++++---------
mm/sparse-vmemmap.c | 16 ++++++++++++----
2 files changed, 16 insertions(+), 13 deletions(-)


Also, the issue sashiko reported looks like it was pre-existing, not
introduced by this patch. So:

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

Thanks,
Qi