[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Znnwn0waZXAcNsjn@slm.duckdns.org>
Date: Mon, 24 Jun 2024 12:18:07 -1000
From: Tejun Heo <tj@...nel.org>
To: Peter Zijlstra <peterz@...radead.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()
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?
Thanks.
--
tejun
Powered by blists - more mailing lists