Re: [RFC PATCH v2 8/8] sched, smp: Trace smp callback causing an IPI
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Valentin Schneider <vschneid@xxxxxxxxxx>
- Subject: Re: [RFC PATCH v2 8/8] sched, smp: Trace smp callback causing an IPI
- From: Daniel Bristot de Oliveira <bristot@xxxxxxxxxx>
- Date: Fri, 18 Nov 2022 17:42:34 +0100
- Cc: linux-alpha@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, linux-snps-arc@xxxxxxxxxxxxxxxxxxx, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, linux-csky@xxxxxxxxxxxxxxx, linux-hexagon@xxxxxxxxxxxxxxx, linux-ia64@xxxxxxxxxxxxxxx, loongarch@xxxxxxxxxxxxxxx, linux-mips@xxxxxxxxxxxxxxx, openrisc@xxxxxxxxxxxxxxxxxxxx, linux-parisc@xxxxxxxxxxxxxxx, linuxppc-dev@xxxxxxxxxxxxxxxx, linux-riscv@xxxxxxxxxxxxxxxxxxx, linux-s390@xxxxxxxxxxxxxxx, linux-sh@xxxxxxxxxxxxxxx, sparclinux@xxxxxxxxxxxxxxx, linux-xtensa@xxxxxxxxxxxxxxxx, x86@xxxxxxxxxx, "Paul E. McKenney" <paulmck@xxxxxxxxxx>, Steven Rostedt <rostedt@xxxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>, Juri Lelli <juri.lelli@xxxxxxxxxx>, Marcelo Tosatti <mtosatti@xxxxxxxxxx>, Frederic Weisbecker <frederic@xxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, Borislav Petkov <bp@xxxxxxxxx>, Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>, "H. Peter Anvin" <hpa@xxxxxxxxx>, Marc Zyngier <maz@xxxxxxxxxx>, Mark Rutland <mark.rutland@xxxxxxx>, Russell King <linux@xxxxxxxxxxxxxxx>, Nicholas Piggin <npiggin@xxxxxxxxx>, Guo Ren <guoren@xxxxxxxxxx>, "David S. Miller" <davem@xxxxxxxxxxxxx>
- In-reply-to: <Y3dMiyFn6TG1s5g3@hirez.programming.kicks-ass.net>
- References: <20221102182949.3119584-1-vschneid@redhat.com> <20221102183336.3120536-7-vschneid@redhat.com> <Y3ZBUMteJysc1/lA@hirez.programming.kicks-ass.net> <xhsmhfsehy706.mognet@vschneid.remote.csb> <Y3dMiyFn6TG1s5g3@hirez.programming.kicks-ass.net>
- User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.1
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
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]