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

From: Tejun Heo
Date: Mon Dec 12 2022 - 12:35:38 EST


Hello,

On Mon, Dec 12, 2022 at 12:22:43PM +0100, Peter Zijlstra wrote:
> 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).

I'm not quite following. Can you please expand on why prio isn't a generally
useful concept?

Thanks.

--
tejun