Re: [PATCH] mm: Add AnonZero accounting for zero-filled anonymous pages
From: David Hildenbrand (Arm)
Date: Mon Feb 16 2026 - 06:45:58 EST
On 2/16/26 12:34, Kiryl Shutsemau wrote:
On Sat, Feb 14, 2026 at 04:45:14PM +0800, Wenchao Hao wrote:
Add kernel command line option "count_zero_page" to track anonymous pages
have been allocated and mapped to userspace but zero-filled.
This feature is mainly used to debug large folio mechanism, which
pre-allocates and map more pages than actually needed, leading to memory
waste from unaccessed pages.
Export the result in /proc/pid/smaps as "AnonZero" field.
I expect it to slowdown /proc/pid/smaps read substantially. I don't
think this line in smaps worth it.
That's why it's enabled through a command line parameter.
--
Cheers,
David