diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/sched_fair.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c index 032b548be0fc..f1c615ff39d6 100644 --- a/kernel/sched_fair.c +++ b/kernel/sched_fair.c | |||
@@ -2554,9 +2554,14 @@ static inline void update_sd_lb_stats(struct sched_domain *sd, int this_cpu, | |||
2554 | /* | 2554 | /* |
2555 | * In case the child domain prefers tasks go to siblings | 2555 | * In case the child domain prefers tasks go to siblings |
2556 | * first, lower the sg capacity to one so that we'll try | 2556 | * first, lower the sg capacity to one so that we'll try |
2557 | * and move all the excess tasks away. | 2557 | * and move all the excess tasks away. We lower the capacity |
2558 | * of a group only if the local group has the capacity to fit | ||
2559 | * these excess tasks, i.e. nr_running < group_capacity. The | ||
2560 | * extra check prevents the case where you always pull from the | ||
2561 | * heaviest group when it is already under-utilized (possible | ||
2562 | * with a large weight task outweighs the tasks on the system). | ||
2558 | */ | 2563 | */ |
2559 | if (prefer_sibling) | 2564 | if (prefer_sibling && !local_group && sds->this_has_capacity) |
2560 | sgs.group_capacity = min(sgs.group_capacity, 1UL); | 2565 | sgs.group_capacity = min(sgs.group_capacity, 1UL); |
2561 | 2566 | ||
2562 | if (local_group) { | 2567 | if (local_group) { |