[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250716134513.GB905792@noisy.programming.kicks-ass.net>
Date: Wed, 16 Jul 2025 15:45:13 +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 03:40:13PM +0200, Gabriele Monaco wrote:
> On Wed, 2025-07-16 at 14:38 +0200, Peter Zijlstra wrote:
> > > @@ -6786,6 +6793,7 @@ static void __sched notrace __schedule(int
> > > sched_mode)
> > > rq = context_switch(rq, prev, next, &rf);
> > > } else {
> > > rq_unpin_lock(rq, &rf);
> > > + trace_sched_switch_vain_tp(preempt, prev,
> > > prev_state);
> > > __balance_callbacks(rq);
> > > raw_spin_rq_unlock_irq(rq);
> > > }
> >
> > Hurmph... don't you already have this covered by:
> > trace_sched_exit_tp() ?
> >
> > Specifically, the only case where is_switch := false, is this case.
>
> Mostly, it may work in some cases, but sched_exit happens with
> interrupt enabled while all types of switches (including the vain ones)
> must occur with interrupt disabled.
>
> Some assumptions don't stand without this tracepoint, but I guess I
> could adapt monitors to live without this if you believe it's not worth
> adding a new tracepoint there.
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.
Powered by blists - more mailing lists