[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1208988571.2849.10.camel@lappy>
Date: Thu, 24 Apr 2008 00:09:31 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Ingo Molnar <mingo@...e.hu>
Cc: Dhaval Giani <dhaval@...ux.vnet.ibm.com>,
Srivatsa Vaddagiri <vatsa@...ibm.com>,
Dmitry Adamushko <dmitry.adamushko@...il.com>,
linux-kernel <linux-kernel@...r.kernel.org>,
David Miller <davem@...emloft.net>,
Mike Galbraith <efault@....de>
Subject: [RFC][PATCH 2/2] sched: aggregate_group_shares no loop
Subject: sched: aggregate_group_shares no loop
Remove the chance of getting trapped in the loop.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@...llo.nl>
---
kernel/sched.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
Index: linux-2.6-2/kernel/sched.c
===================================================================
--- linux-2.6-2.orig/kernel/sched.c
+++ linux-2.6-2/kernel/sched.c
@@ -1713,7 +1713,6 @@ void aggregate_group_shares(struct task_
unsigned long shares = 0;
int i;
-again:
for_each_cpu_mask(i, sd->span)
shares += tg->cfs_rq[i]->shares;
@@ -1723,7 +1722,9 @@ again:
*/
if (unlikely(!shares && aggregate(tg, sd)->rq_weight)) {
__aggregate_redistribute_shares(tg);
- goto again;
+
+ for_each_cpu_mask(i, sd->span)
+ shares += tg->cfs_rq[i]->shares;
}
aggregate(tg, sd)->shares = shares;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists