linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Shakeel Butt <shakeel.butt@linux.dev>
To: Vlastimil Babka <vbabka@suse.cz>
Cc: Matthew Wilcox <willy@infradead.org>,
	 Andrew Morton <akpm@linux-foundation.org>,
	Johannes Weiner <hannes@cmpxchg.org>,
	 Michal Hocko <mhocko@kernel.org>,
	Roman Gushchin <roman.gushchin@linux.dev>,
	 Muchun Song <muchun.song@linux.dev>,
	Axel Rasmussen <axelrasmussen@google.com>,
	 Steven Rostedt <rostedt@goodmis.org>,
	Suren Baghdasaryan <surenb@google.com>,
	linux-mm@kvack.org,  cgroups@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	 Meta kernel team <kernel-team@meta.com>
Subject: Re: [PATCH] mm: mmap_lock: optimize mmap_lock tracepoints
Date: Sat, 23 Nov 2024 22:26:30 -0800	[thread overview]
Message-ID: <h7qapwdyg452s7k6qyhea42gp2dkqsvymm5iwe6wrjaltcq6z6@weqt46qywfbn> (raw)
In-Reply-To: <c3eb6f05-f857-4c3d-9ef8-2488baecb00c@suse.cz>

On Sat, Nov 23, 2024 at 10:38:59PM +0100, Vlastimil Babka wrote:
> On 11/23/24 22:35, Shakeel Butt wrote:
> > On Sat, Nov 23, 2024 at 05:01:57PM +0000, Matthew Wilcox wrote:
> >> On Fri, Nov 22, 2024 at 10:09:39PM -0800, Shakeel Butt wrote:
> >> >  	TP_printk(
> >> > -		"mm=%p memcg_path=%s write=%s",
> >> > -		__entry->mm,
> >> > -		__get_str(memcg_path),
> >> > +		"mm=%p memcg_id=%llu write=%s",
> >> > +		__entry->mm, __entry->memcg_id,
> >> >  		__entry->write ? "true" : "false"
> >> 
> >> Is it actually useful to print out the (hashed) pointer of the mm?
> >> Wouldn't the PID be more useful so you could actually associate it with
> >> a task?
> >> 
> > 
> > For our usecase i.e. bpftrace, we don't really care about these prints
> > as we can directly access the arguments like mm in bpftrace. I wonder if
> > others are using this hased pointer in some other way. I don't mind
> > chaning it but I think that would be a separate patch.
> 
> I wonder if it's actually hashed when trace events are obtained in binary
> form, i.e. via trace-cmd. Might be hashed only when doing e.g. cat
> trace_pipe as that's when the kernel's printk with its hashing is used?
> 
> I guess that would be another argument for not using it in the tracepoint,
> as it would be a sidechannel...

Yup trace-cmd is showing the unhashed raw pointers for mm. If there is
agreement, I can remove the printk of mm pointer in next version.


  reply	other threads:[~2024-11-24  6:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-23  6:09 Shakeel Butt
2024-11-23  6:46 ` Yosry Ahmed
2024-11-23 21:14   ` Shakeel Butt
2024-11-23  8:38 ` Vlastimil Babka
2024-11-23 21:15   ` Shakeel Butt
2024-11-23 17:01 ` Matthew Wilcox
2024-11-23 21:35   ` Shakeel Butt
2024-11-23 21:38     ` Vlastimil Babka
2024-11-24  6:26       ` Shakeel Butt [this message]
2024-11-24 13:39       ` Steven Rostedt

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=h7qapwdyg452s7k6qyhea42gp2dkqsvymm5iwe6wrjaltcq6z6@weqt46qywfbn \
    --to=shakeel.butt@linux.dev \
    --cc=akpm@linux-foundation.org \
    --cc=axelrasmussen@google.com \
    --cc=cgroups@vger.kernel.org \
    --cc=hannes@cmpxchg.org \
    --cc=kernel-team@meta.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@kernel.org \
    --cc=muchun.song@linux.dev \
    --cc=roman.gushchin@linux.dev \
    --cc=rostedt@goodmis.org \
    --cc=surenb@google.com \
    --cc=vbabka@suse.cz \
    --cc=willy@infradead.org \
    /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