Re: [PATCH 05/31] sched: Add sched_class->reweight_task()

From: Peter Zijlstra
Date: Mon Dec 12 2022 - 06:24:13 EST


On Tue, Nov 29, 2022 at 10:22:47PM -1000, Tejun Heo wrote:
> diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
> index a4a20046e586..08799b2a566e 100644
> --- a/kernel/sched/sched.h
> +++ b/kernel/sched/sched.h
> @@ -2193,6 +2193,8 @@ struct sched_class {
> */
> void (*switched_from)(struct rq *this_rq, struct task_struct *task);
> void (*switched_to) (struct rq *this_rq, struct task_struct *task);
> + void (*reweight_task)(struct rq *this_rq, struct task_struct *task,
> + int newprio);
> void (*prio_changed) (struct rq *this_rq, struct task_struct *task,
> int oldprio);

Hurmph.. this further propagate the existing problem of thinking that
'prio' is a useful concept in general (it isn't).

Yeah, you're just following precedent here, but still :/