On Sep 5, 2026, at 16:20, Qi Zheng [off-list ref] wrote:
Hi Muchun,
Hi,
On 8/31/26 3:53 PM, Muchun Song wrote:
quoted
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.
Yes, because compound_nr_pages() determines the number of struct pages to
initialize with section as the smallest granularity, they cannot be mixed.
quoted
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 <redacted>
---
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@linux.dev>
Thanks.
Thanks,
Qi