[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250716141958.GC905792@noisy.programming.kicks-ass.net>
Date: Wed, 16 Jul 2025 16:19:58 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Gabriele Monaco <gmonaco@...hat.com>
Cc: linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...hat.com>,
Steven Rostedt <rostedt@...dmis.org>,
Masami Hiramatsu <mhiramat@...nel.org>,
linux-trace-kernel@...r.kernel.org, Nam Cao <namcao@...utronix.de>,
Tomas Glozar <tglozar@...hat.com>, Juri Lelli <jlelli@...hat.com>,
Clark Williams <williams@...hat.com>,
John Kacur <jkacur@...hat.com>
Subject: Re: [PATCH v3 12/17] sched: Adapt sched tracepoints for RV task model
On Wed, Jul 16, 2025 at 04:07:16PM +0200, Gabriele Monaco wrote:
> On Wed, 2025-07-16 at 15:45 +0200, Peter Zijlstra wrote:
> >
> > I'm not sure I understand the importance of IRQ state when describing
> > task transitions.
> >
> > You know both:
> >
> > - schedule() invocations for any one task are in-order;
> > - schedule() invocations for any one CPU are in-order.
> >
>
> It's to describe latencies, which is the original purpose of the
> scheduler model: if the event supposed to wake up an RT task occurs
> with interrupts disabled while scheduling, we'd need to wait for that
> run to complete.
> Now to be fair, it doesn't really matter whether that call to
> __schedule switches or not, but always having a switch event simplifies
> things while modelling.
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();
Also, can we get rid of that CALLER_ADDR0 argument as well?
Powered by blists - more mailing lists