[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240625081633.GS31592@noisy.programming.kicks-ass.net>
Date: Tue, 25 Jun 2024 10:16:33 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Tejun Heo <tj@...nel.org>
Cc: torvalds@...ux-foundation.org, mingo@...hat.com, juri.lelli@...hat.com,
vincent.guittot@...aro.org, dietmar.eggemann@....com,
rostedt@...dmis.org, bsegall@...gle.com, mgorman@...e.de,
bristot@...hat.com, vschneid@...hat.com, ast@...nel.org,
daniel@...earbox.net, andrii@...nel.org, martin.lau@...nel.org,
joshdon@...gle.com, brho@...gle.com, pjt@...gle.com,
derkling@...gle.com, haoluo@...gle.com, dvernet@...a.com,
dschatzberg@...a.com, dskarlat@...cmu.edu, riel@...riel.com,
changwoo@...lia.com, himadrics@...ia.fr, memxor@...il.com,
andrea.righi@...onical.com, joel@...lfernandes.org,
linux-kernel@...r.kernel.org, bpf@...r.kernel.org,
kernel-team@...a.com
Subject: Re: [PATCH 05/39] sched: Add sched_class->switching_to() and expose
check_class_changing/changed()
On Mon, Jun 24, 2024 at 12:18:07PM -1000, Tejun Heo wrote:
> Hello, Peter.
>
> On Mon, Jun 24, 2024 at 01:06:24PM +0200, Peter Zijlstra wrote:
> ...
> > > + void (*switching_to) (struct rq *this_rq, struct task_struct *task);
> > > void (*switched_from)(struct rq *this_rq, struct task_struct *task);
> > > void (*switched_to) (struct rq *this_rq, struct task_struct *task);
> >
> > So I *think* that I can handle all the current cases in
> > sched_class::{en,de}queue_task() if we add {EN,DE}QUEUE_CLASS flags.
> >
> > Would that work for the BPF thing as well?
> >
> > Something like the very much incomplete below... It would allow removing
> > all these switch{ed,ing}_{to,from}() things entirely, instead of
> > adding yet more.
>
> Hmm... so, I tried to make it work for SCX but enqueue() and dequeue() are
> only called if the task was queued at the time of sched_class change, right?
> However, these callbacks expect to be called even when the task is not
> currently queued. Maybe I'm misreading code but it looks like that'd break
> other classes too. What am I missing?
Ah,.. so I think the RT/DL ones can work (which is what I looked at),
they're only concerned with balancing tasks that are on the queue.
But yeah, I missed that the fair thing needs it regardless.
Bummer. I was hoping to reduce calls.
Powered by blists - more mailing lists