Re: [PATCH v7 1/6] mm/rmap: add tracepoint for rmap_walk
From: David Hildenbrand (Arm)
Date: Fri Jun 05 2026 - 12:06:00 EST
On 5/30/26 11:03, xu.xin16@xxxxxxxxxx wrote:
> From: xu xin <xu.xin16@xxxxxxxxxx>
>
> Add trace_rmap_walk_start() and trace_rmap_walk_end() to bracket
> reverse mapping walks. Unlike manual clock sampling, these
> tracepoints record no timestamp; latency can be computed offline
> by tools (e.g., perf, trace-cmd) using the event timestamps.
>
> When tracepoints are disabled, the only cost is a static branch
> check (no clock read, no duration calculation), making them
> suitable for production use.
>
> The information (folio type, locked state) helps diagnose
> performance issues in KSM, anonymous, and file-backed rmap walks.
>
> Signed-off-by: xu xin <xu.xin16@xxxxxxxxxx>
> ---
Learning that trace events can easily become stable ABI, we should consider
dropping this patch or switching to DECLARE_TRACE().
See Steve's explanation:
https://lore.kernel.org/r/20260603130006.7d2c4a62@xxxxxxxxxxxxxxxxxx
I assume this could be carried as an OOT patch when really working debugging
scenarios?
--
Cheers,
David