From dcee19534ce90aab3f3f859f5644e3231de8bac7 Mon Sep 17 00:00:00 2001 From: Nikhil Rao Date: Fri, 15 Oct 2010 13:12:30 -0700 Subject: [PATCH] --- yaml --- r: 211983 b: refs/heads/master c: 75dd321d79d495a0ee579e6249ebc38ddbb2667f h: refs/heads/master i: 211981: 668221731b3f758ec90d31db4b8b5d0912e7a77a 211979: adc7da1800c41b3177d5d45b988abde949dd4acc 211975: 50ec948986f0a71111495bb2288c63cb7e863ce5 211967: 16b897001e75feaa21e429be70f632cab302aa4a v: v3 --- [refs] | 2 +- trunk/kernel/sched_fair.c | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 14ef82e5f470..88102575732c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: fab476228ba37907ad75216d0fd9732ada9c119e +refs/heads/master: 75dd321d79d495a0ee579e6249ebc38ddbb2667f diff --git a/trunk/kernel/sched_fair.c b/trunk/kernel/sched_fair.c index 032b548be0fc..f1c615ff39d6 100644 --- a/trunk/kernel/sched_fair.c +++ b/trunk/kernel/sched_fair.c @@ -2554,9 +2554,14 @@ static inline void update_sd_lb_stats(struct sched_domain *sd, int this_cpu, /* * In case the child domain prefers tasks go to siblings * first, lower the sg capacity to one so that we'll try - * and move all the excess tasks away. + * and move all the excess tasks away. We lower the capacity + * of a group only if the local group has the capacity to fit + * these excess tasks, i.e. nr_running < group_capacity. The + * extra check prevents the case where you always pull from the + * heaviest group when it is already under-utilized (possible + * with a large weight task outweighs the tasks on the system). */ - if (prefer_sibling) + if (prefer_sibling && !local_group && sds->this_has_capacity) sgs.group_capacity = min(sgs.group_capacity, 1UL); if (local_group) {