Re: [PATCH v3 12/17] sched: Adapt sched tracepoints for RV task model
From: Gabriele Monaco <gmonaco@redhat.com>
Date: 2025-07-16 14:38:42
Also in:
lkml
On Wed, 2025-07-16 at 16:19 +0200, Peter Zijlstra wrote:
So in general I'm a minimalist; less is more etc.
Even if you care about latencies, I don't see what that tracepoint adds. In
fact, I don't even see the point of the .is_switch argument to
trace_sched_exit_tp(). That state can be fully reconstructed from having seen
trace_sched_switch() between trace_sched_{enter,exit}_tp().
As for the IRQ state, if you see:
trace_sched_enter_tp();
trace_irq_disable();
trace_irq_enable();
You already know all you need to know; there was no switch, otherwise
it would'be been:
trace_sched_enter_tp();
trace_irq_disable();
trace_sched_switch();
trace_irq_enable();Or you could see: trace_sched_enter_tp(); trace_irq_disable(); trace_irq_enable(); trace_irq_disable(); trace_sched_switch(); trace_irq_enable(); Where in fact there /was/ a switch, that trace was actually something like: trace_sched_enter_tp(); trace_irq_disable(); **irq_entry();** **irq_exit();** trace_irq_enable(); trace_irq_disable(); trace_sched_switch(); trace_irq_enable(); So as you said, we can still reconstruct what happened from the trace, but the model suddenly needs more states and more events. If we could directly tell whether interrupts were disabled manually or from an actual interrupt, that wouldn't be necessary, for instance (as in the original model by Daniel). I get your point why we don't really need the additional tracepoint, but some arguments giving more context come almost for free.
Also, can we get rid of that CALLER_ADDR0 argument as well?
Yeah good point, this might have been be useful to understand some things (__schedule called from preempt_irq for instance) but it's a pain to make sense out of it.