[lkml]   [2010]   [Nov]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[08/82] sched: Drop all load weight manipulation for RT tasks
2.6.35-stable review patch.  If anyone has any objections, please let us know.


From: Linus Walleij <>

commit 17bdcf949d03306b308c5fb694849cd35f119807 upstream.

Load weights are for the CFS, they do not belong in the RT task. This makes all
RT scheduling classes leave the CFS weights alone.

This fixes a real bug as well: I noticed the following phonomena: a process
elevated to SCHED_RR forks with SCHED_RESET_ON_FORK set, and the child is
indeed SCHED_OTHER, and the niceval is indeed reset to 0. However the weight
inserted by set_load_weight() remains at 0, giving the task insignificat

With this fix, the weight is reset to what the task had before being elevated

Cc: Lennart Poettering <>
Signed-off-by: Linus Walleij <>
Signed-off-by: Peter Zijlstra <>
LKML-Reference: <>
Signed-off-by: Ingo Molnar <>
Signed-off-by: Greg Kroah-Hartman <>

kernel/sched.c | 6 ------
1 file changed, 6 deletions(-)

--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -1830,12 +1830,6 @@ static void dec_nr_running(struct rq *rq

static void set_load_weight(struct task_struct *p)
- if (task_has_rt_policy(p)) {
- p->se.load.weight = 0;
- p->se.load.inv_weight = WMULT_CONST;
- return;
- }
* SCHED_IDLE tasks get minimal weight:

 \ /
  Last update: 2010-11-19 23:37    [W:0.026 / U:14.536 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site