From: Peter Zijlstra <peterz@infradead.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: Dhaval Giani <dhaval@linux.vnet.ibm.com>,
Srivatsa Vaddagiri <vatsa@in.ibm.com>,
Dmitry Adamushko <dmitry.adamushko@gmail.com>,
linux-kernel <linux-kernel@vger.kernel.org>,
David Miller <davem@davemloft.net>,
Mike Galbraith <efault@gmx.de>
Subject: [RFC][PATCH 2/2] sched: aggregate_group_shares no loop
Date: Thu, 24 Apr 2008 00:09:31 +0200 [thread overview]
Message-ID: <1208988571.2849.10.camel@lappy> (raw)
In-Reply-To: <1208988476.2849.8.camel@lappy>
Subject: sched: aggregate_group_shares no loop
Remove the chance of getting trapped in the loop.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.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;
next prev parent reply other threads:[~2008-04-23 22:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-23 22:07 [RFC][PATCH 1/2] sched: higher granularity load on 64bit systems Peter Zijlstra
2008-04-23 22:09 ` Peter Zijlstra [this message]
2008-04-24 0:27 ` David Miller
2008-04-24 1:58 ` Dhaval Giani
2008-04-24 2:13 ` David Miller
2008-04-24 6:47 ` Peter Zijlstra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1208988571.2849.10.camel@lappy \
--to=peterz@infradead.org \
--cc=davem@davemloft.net \
--cc=dhaval@linux.vnet.ibm.com \
--cc=dmitry.adamushko@gmail.com \
--cc=efault@gmx.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=vatsa@in.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox