[PATCH 2/2] sched: readjust the load whenever task_setprio() is invoked

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <stable@...>, <linux-rt-users@...>, <rostedt@...>, <mingo@...>
Cc: <peterz@...>, <ghaskins@...>, <linux-kernel@...>
Date: Thursday, July 3, 2008 - 5:37 pm

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>
---

 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();

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 0/2] sched: misc fixes for stable-25.y and 25-rt, Gregory Haskins, (Thu Jul 3, 5:37 pm)
[PATCH 2/2] sched: readjust the load whenever task_setprio()..., Gregory Haskins, (Thu Jul 3, 5:37 pm)
[PATCH 1/2] sched: remove extraneous load manipulations, Gregory Haskins, (Thu Jul 3, 5:37 pm)
Re: [PATCH 1/2] sched: remove extraneous load manipulations, Gregory Haskins, (Mon Jul 21, 6:06 pm)
Re: [PATCH 1/2] sched: remove extraneous load manipulations, Gregory Haskins, (Fri Jul 18, 8:53 am)