Re: [PATCH v2 3/3] mm/mglru: add tracepoint for inc_max_seq()

From
Baolin Wang <baolin.wang@linux.alibaba.com>
Date
2026-09-14 07:38:10
Also in
linux-mm, lkml
Reply to
Ridong Chen, 2026-09-11

On 9/11/26 6:29 PM, Ridong Chen wrote:
From: Ridong Chen <redacted>

Aging in MGLRU advances max_seq via inc_max_seq(), creating a new
youngest generation. There is currently no tracepoint on this path, so
the moment a new generation is created, and how the min_seq of each type
trails behind it, cannot be observed as it happens.

Add mm_mglru_inc_max_seq, emitted right after max_seq is bumped, with
the memcg id, the new max_seq, the anon and file min_seq, and the number
of pages in each generation for both types, summed over zones the same
way the debugfs lru_gen file reports them. The nr_anon/nr_file arrays are
indexed by generation slot, so the emitted max_seq/min_seq say which slot
holds which seq. They are printed with __print_array(), so the output is
hex and its length follows MAX_NR_GENS automatically. Paired with the
mm_mglru_scan_folios tracepoint it makes the full aging-to-eviction
window observable per memcg.

Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Ridong Chen <redacted>
---
Make sense to me.
Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Thread (19 messages) 19 messages, 4 authors, last reply 28d ago
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help