From: Peter Zijlstra <peterz@infradead.org>
To: Mike Galbraith <efault@gmx.de>
Cc: Ingo Molnar <mingo@elte.hu>, LKML <linux-kernel@vger.kernel.org>,
Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>,
Gautham R Shenoy <ego@in.ibm.com>,
SureshSiddha <suresh.b.siddha@intel.com>,
"Pallipadi,Venkatesh" <venkatesh.pallipadi@intel.com>
Subject: Re: [PATCH 7/6][RFC] sched: unify load_balance{,_newidle}()
Date: Thu, 24 Dec 2009 13:55:08 +0100 [thread overview]
Message-ID: <1261659308.4937.203.camel@laptop> (raw)
In-Reply-To: <1261649811.4937.178.camel@laptop>
On Thu, 2009-12-24 at 11:16 +0100, Peter Zijlstra wrote:
> On Thu, 2009-12-24 at 11:09 +0100, Mike Galbraith wrote:
> > On Thu, 2009-12-24 at 10:29 +0100, Peter Zijlstra wrote:
> >
> > > Is that with just this patch applied or also with the next one? I
> > > worried more about the next one.
> >
> > The next one is the troublemaker.
>
> OK, let me re-read all that code with a fresh(er) mind.
Ok, so how does this work for you?
That balance bit comes from update_sg_lb_stats() where it determines
whether or not this cpu is allowed to load balance, it already excepts
CPU_NEWLY_IDLE, even though that up until recently would always have
passed .balance=NULL.
But looking at the code it assumes the called initializes balance to 1,
not 0.
After this we could probably clean this mess up to not check balance but
assume its !NULL.
---
Index: linux-2.6/kernel/sched_fair.c
===================================================================
--- linux-2.6.orig/kernel/sched_fair.c
+++ linux-2.6/kernel/sched_fair.c
@@ -3031,7 +3031,7 @@ static void idle_balance(int this_cpu, s
for_each_domain(this_cpu, sd) {
unsigned long interval;
- int balance = 0;
+ int balance = 1;
if (!(sd->flags & SD_LOAD_BALANCE))
continue;
next prev parent reply other threads:[~2009-12-24 12:55 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-17 18:50 [PATCH 0/6] Some load-balancer cleanups Peter Zijlstra
2009-12-17 18:50 ` [PATCH 1/6] sched: Move load balance code into sched_fair.c Peter Zijlstra
2009-12-17 18:50 ` [PATCH 2/6] sched: Remove the sched_class load_balance methods Peter Zijlstra
2009-12-17 18:50 ` [PATCH 3/6] sched: Remove rq_iterator usage from load_balance_fair Peter Zijlstra
2009-12-17 18:50 ` [PATCH 4/6] sched: Remove rq_iterator from move_one_task Peter Zijlstra
2009-12-17 18:50 ` [PATCH 5/6] sched: Remove from fwd decls Peter Zijlstra
2009-12-17 18:50 ` [PATCH 6/6] sched: Add a lock break for PREEMPT=y Peter Zijlstra
2009-12-18 6:57 ` [PATCH 0/6] Some load-balancer cleanups Ingo Molnar
2009-12-18 9:37 ` Peter Zijlstra
2009-12-23 15:13 ` [PATCH 7/6][RFC] sched: unify load_balance{,_newidle}() Peter Zijlstra
2009-12-24 4:43 ` Mike Galbraith
2009-12-24 9:29 ` Peter Zijlstra
2009-12-24 10:01 ` Mike Galbraith
2009-12-24 10:09 ` Mike Galbraith
2009-12-24 10:16 ` Mike Galbraith
2009-12-24 10:16 ` Peter Zijlstra
2009-12-24 12:55 ` Peter Zijlstra [this message]
2009-12-24 17:43 ` Mike Galbraith
2009-12-23 15:13 ` [PATCH 8/6][RFC] sched: Remove load_balance_newidle() 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=1261659308.4937.203.camel@laptop \
--to=peterz@infradead.org \
--cc=efault@gmx.de \
--cc=ego@in.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=suresh.b.siddha@intel.com \
--cc=svaidy@linux.vnet.ibm.com \
--cc=venkatesh.pallipadi@intel.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