Re: [PATCH] mm: mmap_lock: optimize mmap_lock tracepoints

From: Shakeel Butt
Date: Sat Nov 23 2024 - 16:35:41 EST


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.