lkml.org 
[lkml]   [2006]   [Feb]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] Fix smpnice high priority task hopping problem
Suresh B. Siddha has reported:

"on a lightly loaded system, this will result in higher priority job
hopping around from one processor to another processor.. This is because
of the code in find_busiest_group() which assumes that SCHED_LOAD_SCALE
represents a unit process load and with nice_to_bias calculations this
is no longer true (in the presence of non nice-0 tasks)"

Analysis of this problem as revealed that the smpnice code results in
the weighted load being larger than 1 and this triggers the active load
balancing code. However, in active_load_balance(), the migration thread
fails to take into account itself when deciding if there are any tasks
to be migrated from its run queue. I.e. even if there is only one other
task on the run queue other than itself it will still migrate that other
task.

The attached patch fixes that anomaly.

Signed-off-by: Peter Williams <pwil3058@bigpond.com.au>

Peter
--
Peter Williams pwil3058@bigpond.net.au

"Learning, n. The kind of ignorance distinguishing the studious."
-- Ambrose Bierce
Index: MM-2.6.X/kernel/sched.c
===================================================================
--- MM-2.6.X.orig/kernel/sched.c 2006-02-16 10:51:52.000000000 +1100
+++ MM-2.6.X/kernel/sched.c 2006-02-16 11:02:45.000000000 +1100
@@ -2406,7 +2406,7 @@ static void active_load_balance(runqueue
runqueue_t *target_rq;
int target_cpu = busiest_rq->push_cpu;

- if (busiest_rq->nr_running <= 1)
+ if (busiest_rq->nr_running <= 2)
/* no task to move */
return;
\
 
 \ /
  Last update: 2006-02-16 01:42    [W:0.051 / U:0.708 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site