Re: [PATCH v9 7/7] sched: Split scheduler and execution contexts

From: John Stultz
Date: Mon Apr 01 2024 - 19:34:43 EST


On Mon, Mar 18, 2024 at 8:06 AM Metin Kaya <metin.kaya@xxxxxxx> wrote:
> On 15/03/2024 4:39 am, John Stultz wrote:
> > From: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
> >
> > Let's define the scheduling context as all the scheduler state
> > in task_struct for the task selected to run, and the execution
> > context as all state required to actually run the task.
> >
> > Currently both are intertwined in task_struct. We want to
> > logically split these such that we can use the scheduling
> > context of the task selected to be scheduled, but use the
> > execution context of a different task to actually be run.
> >
> > To this purpose, introduce rq_selected() macro to point to the
> > task_struct selected from the runqueue by the scheduler, and
> > will be used for scheduler state, and preserve rq->curr to
> > indicate the execution context of the task that will actually be
> > run.
> >
> > Cc: Joel Fernandes <joelaf@xxxxxxxxxx>
> > Cc: Qais Yousef <qyousef@xxxxxxxxxx>
> > Cc: Ingo Molnar <mingo@xxxxxxxxxx>
> > Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
> > Cc: Juri Lelli <juri.lelli@xxxxxxxxxx>
> > Cc: Vincent Guittot <vincent.guittot@xxxxxxxxxx>
> > Cc: Dietmar Eggemann <dietmar.eggemann@xxxxxxx>
> > Cc: Valentin Schneider <vschneid@xxxxxxxxxx>
> > Cc: Steven Rostedt <rostedt@xxxxxxxxxxx>
> > Cc: Ben Segall <bsegall@xxxxxxxxxx>
> > Cc: Zimuzo Ezeozue <zezeozue@xxxxxxxxxx>
> > Cc: Youssef Esmat <youssefesmat@xxxxxxxxxx>
> > Cc: Mel Gorman <mgorman@xxxxxxx>
> > Cc: Daniel Bristot de Oliveira <bristot@xxxxxxxxxx>
> > Cc: Will Deacon <will@xxxxxxxxxx>
> > Cc: Waiman Long <longman@xxxxxxxxxx>
> > Cc: Boqun Feng <boqun.feng@xxxxxxxxx>
> > Cc: "Paul E. McKenney" <paulmck@xxxxxxxxxx>
> > Cc: Xuewen Yan <xuewen.yan94@xxxxxxxxx>
> > Cc: K Prateek Nayak <kprateek.nayak@xxxxxxx>
> > Cc: Metin Kaya <Metin.Kaya@xxxxxxx>
> > Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
> > Cc: kernel-team@xxxxxxxxxxx
> > Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
> > Signed-off-by: Juri Lelli <juri.lelli@xxxxxxxxxx>
> > Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
>
> Duplicate S-o-b for Peter.

Yes, though I believe this accurately tracks the path of development.

The patch originally by Peter was sent by Juri:
https://lore.kernel.org/all/20181009092434.26221-5-juri.lelli@xxxxxxxxxx/

Then and Peter put it in a branch on his git tree(adding another SoB
and the Link tag), from which Conor picked it up:
https://lore.kernel.org/lkml/20221003214501.2050087-6-connoro@xxxxxxxxxx/

Followed by me.

That said, I can no longer find the branch in Peter's tree, so it's
possible I have this history wrong, but this is what I recall.

So I'm hesitant to change that part of the attribution, unless Peter
requests otherwise.

thanks
-john