[PATCH v3 3/4] mm/sparse-vmemmap: Fix DAX vmemmap accounting with optimization
Oscar Salvador
osalvador at suse.de
Tue Apr 21 14:00:19 AEST 2026
On Tue, Apr 21, 2026 at 10:20:43AM +0800, Muchun Song wrote:
> When vmemmap optimization is enabled for DAX, the nr_memmap_pages
> counter in /proc/vmstat is incorrect. The current code always accounts
> for the full, non-optimized vmemmap size, but vmemmap optimization
> reduces the actual number of vmemmap pages by reusing tail pages. This
> causes the system to overcount vmemmap usage, leading to inaccurate
> page statistics in /proc/vmstat.
>
> Fix this by introducing section_vmemmap_pages(), which returns the exact
> vmemmap page count for a given pfn range based on whether optimization
> is in effect.
>
> Fixes: 15995a352474 ("mm: report per-page metadata information")
> Signed-off-by: Muchun Song <songmuchun at bytedance.com>
> Acked-by: Mike Rapoport (Microsoft) <rppt at kernel.org>
Acked-by: Oscar Salvador <osalvador at suse.de>
--
Oscar Salvador
SUSE Labs
More information about the Linuxppc-dev
mailing list