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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The load may change with the priority, so be sure to recompute its value.

Signed-off-by: Gregory Haskins <ghaskins@xxxxxxxxxx>
CC: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
CC: Ingo Molnar <mingo@xxxxxxx>
---

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

--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux