Re: [RFC PATCH v4 1/2] trace,smp: Add tracepoints around remotelly called functions

From: Valentin Schneider
Date: Tue May 30 2023 - 06:37:11 EST


On 15/05/23 15:30, Leonardo Bras wrote:
> @@ -375,7 +386,7 @@ static int generic_exec_single(int cpu, call_single_data_t *csd)
> csd_lock_record(csd);
> csd_unlock(csd);
> local_irq_save(flags);
> - func(info);
> + csd_do_func(func, info, csd);

I'd suggest making this match the local case of
smp_call_function_many_cond(), IOW pass NULL as the csd when executing
locally.

IMO this is required for postprocessing with e.g. synthetic events for CSD
delivery measurement, otherwise we'll try to match this execution with a
previous CSD enqueue.

> csd_lock_record(NULL);
> local_irq_restore(flags);
> return 0;