Messages in this thread | | | Subject | Re: [PATCH 2/2] sched: readjust the load whenever task_setprio() is invoked | From | Peter Zijlstra <> | Date | Fri, 18 Jul 2008 14:43:03 +0200 |
| |
On Thu, 2008-07-03 at 15:37 -0600, Gregory Haskins wrote: > The load may change with the priority, so be sure to recompute its value. > > Signed-off-by: Gregory Haskins <ghaskins@novell.com> > CC: Peter Zijlstra <peterz@infradead.org> > CC: Ingo Molnar <mingo@elte.hu>
Right, but in this case we'd need to do the dec/inc load game again because otherwise we'll skew stuff - see the previuos mail on how dequeue_task() doesn't actually do that.
Also, it looks like current mainline still has this issue.
OTOH - since prio boosting is a temporal feature, not changing the load isn't too bad, we ought to get back to where we came from pretty quickly.
> --- > > kernel/sched.c | 1 + > 1 files changed, 1 insertions(+), 0 deletions(-) > > diff --git a/kernel/sched.c b/kernel/sched.c > index b046754..c3f41b9 100644 > --- a/kernel/sched.c > +++ b/kernel/sched.c > @@ -4637,6 +4637,7 @@ void task_setprio(struct task_struct *p, int prio) > p->sched_class = &fair_sched_class; > > p->prio = prio; > + set_load_weight(p); > > // trace_special_pid(p->pid, __PRIO(oldprio), PRIO(p)); > prev_resched = _need_resched(); >
| |