[RFC PATCH v4 0/2] trace,smp: Add tracepoints for csd

Leonardo Bras posted 2 patches 2 years, 8 months ago
There is a newer version of this series
include/trace/events/smp.h | 72 ++++++++++++++++++++++++++++++++++++++
kernel/smp.c               | 41 +++++++++++++---------
2 files changed, 96 insertions(+), 17 deletions(-)
create mode 100644 include/trace/events/smp.h
[RFC PATCH v4 0/2] trace,smp: Add tracepoints for csd
Posted by Leonardo Bras 2 years, 8 months ago
Changes since RFCv3:
- Split the patch in 2: entry/exit and queue
- Fix 'struct __call_single_data' & call_single_data_t alignment issue
- Made all TP_printk follow the same pattern

Changes since RFCv2:
- Fixed some spacing issues and trace calls

Changes since RFCv1:
- Implemented trace_csd_queue_cpu() as suggested by Valentin Schneider
- Using EVENT_CLASS in order to avoid duplication
- Introduced new helper: csd_do_func()
- Name change from smp_call_function_* to csd_function_*
- Rebased on top of torvalds/master

Leonardo Bras (2):
  trace,smp: Add tracepoints around remotelly called functions
  trace,smp: Add tracepoints for scheduling remotelly called functions

 include/trace/events/smp.h | 72 ++++++++++++++++++++++++++++++++++++++
 kernel/smp.c               | 41 +++++++++++++---------
 2 files changed, 96 insertions(+), 17 deletions(-)
 create mode 100644 include/trace/events/smp.h

-- 
2.40.1
Re: [RFC PATCH v4 0/2] trace,smp: Add tracepoints for csd
Posted by Valentin Schneider 2 years, 8 months ago
On 15/05/23 15:30, Leonardo Bras wrote:
> Changes since RFCv3:
> - Split the patch in 2: entry/exit and queue
> - Fix 'struct __call_single_data' & call_single_data_t alignment issue
> - Made all TP_printk follow the same pattern
>

One bikeshedding nit I have is I'd prefer to see the csd_* events in a csd
trace system, to have a sane nomenclature.

Other than that and the other comment on csd_do_func(), this LGTM.

> Changes since RFCv2:
> - Fixed some spacing issues and trace calls
>
> Changes since RFCv1:
> - Implemented trace_csd_queue_cpu() as suggested by Valentin Schneider
> - Using EVENT_CLASS in order to avoid duplication
> - Introduced new helper: csd_do_func()
> - Name change from smp_call_function_* to csd_function_*
> - Rebased on top of torvalds/master
>
> Leonardo Bras (2):
>   trace,smp: Add tracepoints around remotelly called functions
>   trace,smp: Add tracepoints for scheduling remotelly called functions
>
>  include/trace/events/smp.h | 72 ++++++++++++++++++++++++++++++++++++++
>  kernel/smp.c               | 41 +++++++++++++---------
>  2 files changed, 96 insertions(+), 17 deletions(-)
>  create mode 100644 include/trace/events/smp.h
>
> --
> 2.40.1
Re: [RFC PATCH v4 0/2] trace,smp: Add tracepoints for csd
Posted by Leonardo Bras Soares Passos 2 years, 7 months ago
On Tue, May 30, 2023 at 7:36 AM Valentin Schneider <vschneid@redhat.com> wrote:
>
> On 15/05/23 15:30, Leonardo Bras wrote:
> > Changes since RFCv3:
> > - Split the patch in 2: entry/exit and queue
> > - Fix 'struct __call_single_data' & call_single_data_t alignment issue
> > - Made all TP_printk follow the same pattern
> >
>
> One bikeshedding nit I have is I'd prefer to see the csd_* events in a csd
> trace system, to have a sane nomenclature.

Oh, here you mean the file name? (ie: trace/events/smp.h -> trace/events/csd.h)

>
> Other than that and the other comment on csd_do_func(), this LGTM.
>

Thanks!
Other than the above question, it should be fast for me to send a v5.

Best regards,
Leo


> > Changes since RFCv2:
> > - Fixed some spacing issues and trace calls
> >
> > Changes since RFCv1:
> > - Implemented trace_csd_queue_cpu() as suggested by Valentin Schneider
> > - Using EVENT_CLASS in order to avoid duplication
> > - Introduced new helper: csd_do_func()
> > - Name change from smp_call_function_* to csd_function_*
> > - Rebased on top of torvalds/master
> >
> > Leonardo Bras (2):
> >   trace,smp: Add tracepoints around remotelly called functions
> >   trace,smp: Add tracepoints for scheduling remotelly called functions
> >
> >  include/trace/events/smp.h | 72 ++++++++++++++++++++++++++++++++++++++
> >  kernel/smp.c               | 41 +++++++++++++---------
> >  2 files changed, 96 insertions(+), 17 deletions(-)
> >  create mode 100644 include/trace/events/smp.h
> >
> > --
> > 2.40.1
>
Re: [RFC PATCH v4 0/2] trace,smp: Add tracepoints for csd
Posted by Leonardo Bras Soares Passos 2 years, 7 months ago
On Wed, Jun 14, 2023 at 1:14 AM Leonardo Bras Soares Passos
<leobras@redhat.com> wrote:
>
> On Tue, May 30, 2023 at 7:36 AM Valentin Schneider <vschneid@redhat.com> wrote:
> >
> > On 15/05/23 15:30, Leonardo Bras wrote:
> > > Changes since RFCv3:
> > > - Split the patch in 2: entry/exit and queue
> > > - Fix 'struct __call_single_data' & call_single_data_t alignment issue
> > > - Made all TP_printk follow the same pattern
> > >
> >
> > One bikeshedding nit I have is I'd prefer to see the csd_* events in a csd
> > trace system, to have a sane nomenclature.
>
> Oh, here you mean the file name? (ie: trace/events/smp.h -> trace/events/csd.h)

Or just
-#define TRACE_SYSTEM smp
+#define TRACE_SYSTEM csd
?

>
> >
> > Other than that and the other comment on csd_do_func(), this LGTM.
> >
>
> Thanks!
> Other than the above question, it should be fast for me to send a v5.
>
> Best regards,
> Leo
>
>
> > > Changes since RFCv2:
> > > - Fixed some spacing issues and trace calls
> > >
> > > Changes since RFCv1:
> > > - Implemented trace_csd_queue_cpu() as suggested by Valentin Schneider
> > > - Using EVENT_CLASS in order to avoid duplication
> > > - Introduced new helper: csd_do_func()
> > > - Name change from smp_call_function_* to csd_function_*
> > > - Rebased on top of torvalds/master
> > >
> > > Leonardo Bras (2):
> > >   trace,smp: Add tracepoints around remotelly called functions
> > >   trace,smp: Add tracepoints for scheduling remotelly called functions
> > >
> > >  include/trace/events/smp.h | 72 ++++++++++++++++++++++++++++++++++++++
> > >  kernel/smp.c               | 41 +++++++++++++---------
> > >  2 files changed, 96 insertions(+), 17 deletions(-)
> > >  create mode 100644 include/trace/events/smp.h
> > >
> > > --
> > > 2.40.1
> >
Re: [RFC PATCH v4 0/2] trace,smp: Add tracepoints for csd
Posted by Valentin Schneider 2 years, 7 months ago
On 14/06/23 02:16, Leonardo Bras Soares Passos wrote:
> On Wed, Jun 14, 2023 at 1:14 AM Leonardo Bras Soares Passos
> <leobras@redhat.com> wrote:
>>
>> On Tue, May 30, 2023 at 7:36 AM Valentin Schneider <vschneid@redhat.com> wrote:
>> >
>> > On 15/05/23 15:30, Leonardo Bras wrote:
>> > > Changes since RFCv3:
>> > > - Split the patch in 2: entry/exit and queue
>> > > - Fix 'struct __call_single_data' & call_single_data_t alignment issue
>> > > - Made all TP_printk follow the same pattern
>> > >
>> >
>> > One bikeshedding nit I have is I'd prefer to see the csd_* events in a csd
>> > trace system, to have a sane nomenclature.
>>
>> Oh, here you mean the file name? (ie: trace/events/smp.h -> trace/events/csd.h)
>
> Or just
> -#define TRACE_SYSTEM smp
> +#define TRACE_SYSTEM csd
> ?
>

At the very least this yes, and making the file name match that probably
wouldn't hurt.
Re: [RFC PATCH v4 0/2] trace,smp: Add tracepoints for csd
Posted by Leonardo Brás 2 years, 8 months ago
On Mon, 2023-05-15 at 15:30 -0300, Leonardo Bras wrote:
> Changes since RFCv3:
> - Split the patch in 2: entry/exit and queue
> - Fix 'struct __call_single_data' & call_single_data_t alignment issue
> - Made all TP_printk follow the same pattern
> 
> Changes since RFCv2:
> - Fixed some spacing issues and trace calls
> 
> Changes since RFCv1:
> - Implemented trace_csd_queue_cpu() as suggested by Valentin Schneider
> - Using EVENT_CLASS in order to avoid duplication
> - Introduced new helper: csd_do_func()
> - Name change from smp_call_function_* to csd_function_*
> - Rebased on top of torvalds/master
> 
> Leonardo Bras (2):
>   trace,smp: Add tracepoints around remotelly called functions
>   trace,smp: Add tracepoints for scheduling remotelly called functions
> 
>  include/trace/events/smp.h | 72 ++++++++++++++++++++++++++++++++++++++
>  kernel/smp.c               | 41 +++++++++++++---------
>  2 files changed, 96 insertions(+), 17 deletions(-)
>  create mode 100644 include/trace/events/smp.h
> 

argh, almost sure some llvm build will output some alignment warning because
csd_do_func() has an 'struct __call_single_data' argument while the tracepoints
have call_single_data_t arguments.

Other than that, it should be fine.
I will collect other suggestions before sending a v5 with this fix.

Leo