lkml.org 
[lkml]   [2022]   [Nov]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [RFC PATCH v2 8/8] sched, smp: Trace smp callback causing an IPI
From
On 11/18/22 10:12, Peter Zijlstra wrote:
> On Thu, Nov 17, 2022 at 02:45:29PM +0000, Valentin Schneider wrote:
>
>>> + if (trace_ipi_send_cpumask_enabled()) {
>>> + call_single_data_t *csd;
>>> + smp_call_func_t func;
>>> +
>>> + csd = container_of(node, call_single_data_t, node.llist);
>>> +
>>> + func = sched_ttwu_pending;
>>> + if (CSD_TYPE(csd) != CSD_TYPE_TTWU)
>>> + func = csd->func;
>>> +
>>> + if (raw_smp_call_single_queue(cpu, node))
>>> + trace_ipi_send_cpumask(cpumask_of(cpu), _RET_IP_, func);
>> So I went with the tracepoint being placed *before* the actual IPI gets
>> sent to have a somewhat sane ordering between trace_ipi_send_cpumask() and
>> e.g. trace_call_function_single_entry().
>>
>> Packaging the call_single_queue logic makes the code less horrible, but it
>> does mix up the event ordering...
> Keeps em sharp ;-)
>

Having the trace before the IPI avoids the (non ideal) case where the trace stops because of
an IPI execution before we have trace about who sent it... :-(.

-- Daniel

\
 
 \ /
  Last update: 2022-11-18 17:44    [W:0.049 / U:0.688 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site