linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Vlastimil Babka <vbabka@suse.cz>
To: Shakeel Butt <shakeel.butt@linux.dev>,
	Matthew Wilcox <willy@infradead.org>
Cc: 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:38:59 +0100	[thread overview]
Message-ID: <c3eb6f05-f857-4c3d-9ef8-2488baecb00c@suse.cz> (raw)
In-Reply-To: <i3joc4vme76imq2etk7gjfntsy2z5l5niyqobeun5e7m6jh4yi@adwzrxbvuc6l>

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...


  reply	other threads:[~2024-11-23 21:39 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 [this message]
2024-11-24  6:26       ` Shakeel Butt
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=c3eb6f05-f857-4c3d-9ef8-2488baecb00c@suse.cz \
    --to=vbabka@suse.cz \
    --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=shakeel.butt@linux.dev \
    --cc=surenb@google.com \
    --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