Re: [RFC PATCH v2 04/18] mm: count the pages waiting for a grace period
From: David Hildenbrand (Arm)
Date: Mon Nov 09 2026 - 09:53:38 EST
On 11/4/26 14:01, Kiryl Shutsemau (Meta) wrote:
> Deferred folios have refcount 0 and are not on the free lists, so no
> counter shows them. Memory that waits for a grace period is missing
> from the free count and from every LRU count.
>
> Count it per zone in NR_FREE_RCU_PAGES: nr_free_rcu in /proc/vmstat,
> free_rcu in show_free_areas(). Preparation for freeing the waiting
> pages sooner when they hold back memory that is needed.
Even if we switch to having this folio-specific internally, I think it will be
the right approach to expose this as NR_FREE_RCU_PAGES. (not NR_*FOLIOS, for
example, because we want the actual # pages)
Acked-by: David Hildenbrand (Arm) <david@xxxxxxxxxx>
--
Cheers,
David