Re: [RFC PATCH 6/7] mm: add tracepoints and vmstat counters for async teardown

From: Aditya Sharma

Date: Thu Jul 23 2026 - 14:24:03 EST


> > + TP_STRUCT__entry(
> > + __field(struct mm_struct *, mm)
> > + __field(int, pid)
> > + __array(char, comm, TASK_COMM_LEN)
>
> There's an effort to make comm size more dynamic and we want to prevent more
> memcpy of the comm based on TASK_COMM_LEN. Please change the above to:
>
> __string(comm, comm);
>
>
> > + __field(unsigned long, rss)
> > + __field(int, node)
> > + ),
> > +
> > + TP_fast_assign(
> > + __entry->mm = mm;
> > + __entry->pid = current->pid;
> > + memcpy(__entry->comm, current->comm, TASK_COMM_LEN);
>
> And this to:
>
> __assign_str(comm);
>
> > + __entry->rss = rss;
> > + __entry->node = numa_node_id();
> > + ),
> > +
> > + TP_printk("mm=%p pid=%d comm=%s rss=%lukB node=%d",
> > + __entry->mm,
> > + __entry->pid,
> > + __entry->comm,
>
> and this to:
>
> __get_str(comm),
>

Noted.

Thanks

Aditya