[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240624111917.GK31592@noisy.programming.kicks-ass.net>
Date: Mon, 24 Jun 2024 13:19:17 +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, kernel test robot <lkp@...el.com>
Subject: Re: [PATCH 07/39] sched: Expose css_tg() and __setscheduler_prio()
On Wed, May 01, 2024 at 05:09:42AM -1000, Tejun Heo wrote:
> These will be used by a new BPF extensible sched_class.
>
> css_tg() will be used in the init and exit paths to visit all task_groups by
> walking cgroups.
>
> __setscheduler_prio() is used to pick the sched_class matching the current
> prio of the task. For the new BPF extensible sched_class, the mapping from
> the task configuration to sched_class isn't static and depends on a few
> factors - e.g. whether the BPF progs implementing the scheduler are loaded
> and in a serviceable state. That mapping logic will be added to
> __setscheduler_prio().
>
> When the BPF scheduler progs get loaded and unloaded, the mapping changes
> and the new sched_class will walk the tasks applying the new mapping using
> __setscheduler_prio().
>
> v3: Dropped SCHED_CHANGE_BLOCK() as upstream is adding more generic cleanup
> mechanism.
>
> v2: Expose SCHED_CHANGE_BLOCK() too and update the description.
>
> Signed-off-by: Tejun Heo <tj@...nel.org>
> Reviewed-by: David Vernet <dvernet@...a.com>
> Acked-by: Josh Don <joshdon@...gle.com>
> Acked-by: Hao Luo <haoluo@...gle.com>
> Acked-by: Barret Rhoden <brho@...gle.com>
> Reported-by: kernel test robot <lkp@...el.com>
> ---
> kernel/sched/core.c | 7 +------
> kernel/sched/sched.h | 7 +++++++
> 2 files changed, 8 insertions(+), 6 deletions(-)
>
> diff --git a/kernel/sched/core.c b/kernel/sched/core.c
> index 9b60df944263..987209c0e672 100644
> --- a/kernel/sched/core.c
> +++ b/kernel/sched/core.c
> @@ -7098,7 +7098,7 @@ int default_wake_function(wait_queue_entry_t *curr, unsigned mode, int wake_flag
> }
> EXPORT_SYMBOL(default_wake_function);
>
> -static void __setscheduler_prio(struct task_struct *p, int prio)
> +void __setscheduler_prio(struct task_struct *p, int prio)
> {
> if (dl_prio(prio))
> p->sched_class = &dl_sched_class;
FWIW this conflicts with patches in tip/sched/core, and did so at the
time of posting.
Powered by blists - more mailing lists