Re: [PATCH] sched: make p->prio independent of p->mm

From: Steven Rostedt
Date: Thu Apr 23 2020 - 20:41:26 EST


On Fri, 24 Apr 2020 08:30:28 +0800
Hillf Danton <hdanton@xxxxxxxx> wrote:

> > I believe Peter meant axing the double check, not the check together.
> >
> > That is, instead of:
> >
> > if (p->flags & PF_KTHREAD) {
> > if (attr->sched_priority > MAX_RT_PRIO - 1)
> > return -EINVAL;
> > } else {
> > if (attr->sched_priority > MAX_USER_RT_PRIO - 1)
> > return -EINVAL;
> > }
> >
> > Just have:
> >
> > if (attr->sched_priority > MAX_RT_PRIO -1)
> > return -EINVAL;
> >
> Got it, thank you :) Spin in couple of days.

I still think getting rid of MAX_USER_RT_PRIO would be good too.

-- Steve