Re: [PATCH v1] mm: add tracepoints to ksm

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 10 Mar 2023 11:22:54 -0800
Stefan Roesch <shr@xxxxxxxxxxxx> wrote:

> >> +			trace_ksm_remove_rmap_item(stable_node->kpfn, rmap_item, rmap_item->mm);  
> >
> > Instead of dereferencing the stable_node here, where the work could
> > possibly happen outside the trace event and in the hot path, could you pass
> > in the stable_node instead, and then in the TP_fast_assign() do:
> >
> > 		__entry->pfn = stable_node->kpfn;
> >
> >  
> 
> To do this, the structure would need to be exposed. Currently the
> structure is defined in ksm.c. This is an internal structure that we
> most likely don't want to expose. We can get by not printing the pfn
> and use the rmap_item to refer back to it, but exposing it directly
> here is more convenient for debugging.
> 
> Any thoughts?

Sounds like the include/trace/events/ksm.h should be local too.

See my reply about include/trace/events/thermal.h

  https://lore.kernel.org/all/20230227100715.7d896836@xxxxxxxxxxxxxxxxxx/

And their solution.

  https://lore.kernel.org/all/20230307133735.90772-2-daniel.lezcano@xxxxxxxxxx/

I suggest you do the same.

-- Steve




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux