diff options
Diffstat (limited to 'kernel/sched_fair.c')
-rw-r--r-- | kernel/sched_fair.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c index 280892e9d85e..a37f311f436e 100644 --- a/kernel/sched_fair.c +++ b/kernel/sched_fair.c | |||
@@ -1360,7 +1360,7 @@ static int select_task_rq_fair(struct task_struct *p, int sd_flag, int flags) | |||
1360 | * If power savings logic is enabled for a domain, see if we | 1360 | * If power savings logic is enabled for a domain, see if we |
1361 | * are not overloaded, if so, don't balance wider. | 1361 | * are not overloaded, if so, don't balance wider. |
1362 | */ | 1362 | */ |
1363 | if (tmp->flags & SD_POWERSAVINGS_BALANCE) { | 1363 | if (tmp->flags & (SD_POWERSAVINGS_BALANCE|SD_PREFER_LOCAL)) { |
1364 | unsigned long power = 0; | 1364 | unsigned long power = 0; |
1365 | unsigned long nr_running = 0; | 1365 | unsigned long nr_running = 0; |
1366 | unsigned long capacity; | 1366 | unsigned long capacity; |
@@ -1373,7 +1373,10 @@ static int select_task_rq_fair(struct task_struct *p, int sd_flag, int flags) | |||
1373 | 1373 | ||
1374 | capacity = DIV_ROUND_CLOSEST(power, SCHED_LOAD_SCALE); | 1374 | capacity = DIV_ROUND_CLOSEST(power, SCHED_LOAD_SCALE); |
1375 | 1375 | ||
1376 | if (nr_running/2 < capacity) | 1376 | if (tmp->flags & SD_POWERSAVINGS_BALANCE) |
1377 | nr_running /= 2; | ||
1378 | |||
1379 | if (nr_running < capacity) | ||
1377 | break; | 1380 | break; |
1378 | } | 1381 | } |
1379 | 1382 | ||