[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANDhNCpZShTa7s6WjeLeCkuLeTPQarqg94jbE2hHTNp=E6t3vQ@mail.gmail.com>
Date: Thu, 21 Dec 2023 10:23:26 -0800
From: John Stultz <jstultz@...gle.com>
To: Metin Kaya <metin.kaya@....com>
Cc: LKML <linux-kernel@...r.kernel.org>, Peter Zijlstra <peterz@...radead.org>,
Joel Fernandes <joelaf@...gle.com>, Qais Yousef <qyousef@...gle.com>, Ingo Molnar <mingo@...hat.com>,
Juri Lelli <juri.lelli@...hat.com>, Vincent Guittot <vincent.guittot@...aro.org>,
Dietmar Eggemann <dietmar.eggemann@....com>, Valentin Schneider <vschneid@...hat.com>,
Steven Rostedt <rostedt@...dmis.org>, Ben Segall <bsegall@...gle.com>,
Zimuzo Ezeozue <zezeozue@...gle.com>, Youssef Esmat <youssefesmat@...gle.com>,
Mel Gorman <mgorman@...e.de>, Daniel Bristot de Oliveira <bristot@...hat.com>, Will Deacon <will@...nel.org>,
Waiman Long <longman@...hat.com>, Boqun Feng <boqun.feng@...il.com>,
"Paul E. McKenney" <paulmck@...nel.org>, Xuewen Yan <xuewen.yan94@...il.com>,
K Prateek Nayak <kprateek.nayak@....com>, Thomas Gleixner <tglx@...utronix.de>, kernel-team@...roid.com,
"Connor O'Brien" <connoro@...gle.com>
Subject: Re: [PATCH v7 08/23] sched: Split scheduler and execution contexts
On Thu, Dec 21, 2023 at 2:44 AM Metin Kaya <metin.kaya@....com> wrote:
>
> On 20/12/2023 12:18 am, John Stultz wrote:
> > From: Peter Zijlstra <peterz@...radead.org>
> >
> > 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.
>
> Should we update Documentation/kernel-hacking/hacking.rst (line #348:
> :c:macro:`current`) or another appropriate doc to announce separation of
> scheduling & execution contexts?
So I like this suggestion, but the hacking.rst file feels a little too
general to be getting into the subtleties of scheduler internals.
The splitting of the scheduler context and the execution context
really is just a scheduler detail, as everything else will still deal
just with the execution context as before. So it's really only for
scheduler accounting that we utilize the "rq_selected" scheduler
context.
Maybe something under Documentation/scheduler/ would be more
appropriate? Though the documents there are all pretty focused on
particular sched classes, and not much on the core logic that is most
affected by this conceptual change. I guess maybe adding
sched-core.txt document might be useful to have for this sort of
detail (though a bit daunting to write from scratch).
thanks
-john
Powered by blists - more mailing lists