mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "David Hildenbrand (Arm)" <david@kernel.org>
To: xu.xin16@zte.com.cn, akpm@linux-foundation.org
Cc: chengming.zhou@linux.dev, hughd@google.com,
	wang.yaxin@zte.com.cn, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org, ljs@kernel.org, corbet@lwn.net
Subject: Re: [PATCH v7 1/6] mm/rmap: add tracepoint for rmap_walk
Date: Fri, 5 Jun 2026 17:53:19 +0200	[thread overview]
Message-ID: <041ba9b4-305e-49b1-affd-079fe4220e48@kernel.org> (raw)
In-Reply-To: <202605301703094695zmVgcSC27BNR0rH0N8_x@zte.com.cn>

On 5/30/26 11:03, xu.xin16@zte.com.cn wrote:
> From: xu xin <xu.xin16@zte.com.cn>
> 
> 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@zte.com.cn>
> ---

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@gandalf.local.home

I assume this could be carried as an OOT patch when really working debugging
scenarios?

-- 
Cheers,

David

  reply	other threads:[~2026-06-05 15:53 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-30  8:59 [PATCH v7 0/6] KSM: performance optimizations for rmap_walk_ksm xu.xin16
2026-05-30  9:03 ` [PATCH v7 1/6] mm/rmap: add tracepoint for rmap_walk xu.xin16
2026-06-05 15:53   ` David Hildenbrand (Arm) [this message]
2026-05-30  9:04 ` [PATCH v7 2/6] tools/testing: add rmap walk latency benchmark xu.xin16
2026-06-05 15:54   ` David Hildenbrand (Arm)
2026-05-30  9:06 ` [PATCH v7 3/6] MAINTAINERS: add myself as reviewer for rmap section xu.xin16
2026-06-05 16:03   ` David Hildenbrand (Arm)
2026-06-05 16:16     ` Lorenzo Stoakes
2026-05-30  9:07 ` [PATCH v7 4/6] ksm: add pgoff into ksm_rmap_item xu.xin16
2026-06-05 17:19   ` David Hildenbrand (Arm)
2026-06-09  4:51     ` xu.xin16
2026-05-30  9:09 ` [PATCH v7 5/6] ksm: Optimize rmap_walk_ksm by passing a suitable pgoff xu.xin16
2026-05-30  9:10 ` [PATCH v7 6/6] ksm: add mremap selftests for ksm_rmap_walk xu.xin16

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=041ba9b4-305e-49b1-affd-079fe4220e48@kernel.org \
    --to=david@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=chengming.zhou@linux.dev \
    --cc=corbet@lwn.net \
    --cc=hughd@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ljs@kernel.org \
    --cc=wang.yaxin@zte.com.cn \
    --cc=xu.xin16@zte.com.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox