Re: [PATCH] smp: generic ipi_raise tracepoint

From: Wojciech Kudla
Date: Thu May 21 2020 - 16:11:40 EST


On 21/05/2020 20:00, Nadav Amit wrote:

>> - if (llist_add(&csd->llist, &per_cpu(call_single_queue, cpu)))
>> + if (llist_add(&csd->llist, &per_cpu(call_single_queue, cpu))) {
>> + if (trace_ipi_raise_enabled())
>
> Why do you need this check? trace_ipi_raise() will do the same check before
> actual tracing:
>
> if (static_key_false(&__tracepoint_##name.key)
>

Yes, my motivation for conditional logic was performance-driven.
Thanks for pointing out the implicit check.

>
> In general, I think there are too many trace-points. They look benign(i.e.,
> free), but can cause worse code to be generated as they behave as a memory
> clobber. Many times the same result can be achieved with a probe.
>

Thank you for the review, I agree this may not be optimal. Let's just stop here.
There's a different patch I submitted today that follows Peter's suggestions
about smp function calls being much more sensible target for new tracepoints.

http://lkml.kernel.org/r/e6141d56-1da1-6c00-198f-cbe4385327ff@xxxxxxxxx

Thanks,
W.