From: Ingo Molnar <mingo@elte.hu>
To: Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com>
Cc: Christoph Lameter <clameter@sgi.com>,
"Siddha, Suresh B" <suresh.b.siddha@intel.com>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
Thomas Gleixner <tglx@linutronix.de>,
Dinakar Guniguntala <dino@in.ibm.com>,
Dmitry Adamushko <dmitry.adamushko@gmail.com>,
pwil3058@bigpond.net.au, linux-kernel@vger.kernel.org,
akpm@linux-foundation.org
Subject: Re: v2.6.21.4-rt11
Date: Tue, 19 Jun 2007 10:07:37 +0200 [thread overview]
Message-ID: <20070619080737.GB22371@elte.hu> (raw)
In-Reply-To: <20070619054901.GA10981@linux.vnet.ibm.com>
* Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com> wrote:
> On Mon, Jun 18, 2007 at 08:46:03PM -0700, Christoph Lameter wrote:
> > @@ -2493,17 +2493,18 @@ static void idle_balance(int this_cpu, s
> > unsigned long next_balance = jiffies + 60 * HZ;
> >
> > for_each_domain(this_cpu, sd) {
> > - if (sd->flags & SD_BALANCE_NEWIDLE) {
> > + unsigned long interval;
> > +
>
> Do we need a :
>
> if (!(sd->flags & SD_LOAD_BALANCE))
> continue;
>
> here?
>
> Otherwise patch look good and fixes the problem Paul observed earlier.
great! I've applied the patch below (added your fix and cleaned it up a
bit) and have released 2.6.21.5-rt17 with it.
Ingo
------------------------------>
From: Christoph Lameter <clameter@sgi.com>
Subject: [patch] sched: fix next_interval determination in idle_balance().
The intervals of domains that do not have SD_BALANCE_NEWIDLE must
be considered for the calculation of the time of the next balance.
Otherwise we may defer rebalancing forever.
Siddha also spotted that the conversion of the balance interval
to jiffies is missing. Fix that to.
From: Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com>
also continue the loop if !(sd->flags & SD_LOAD_BALANCE).
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
kernel/sched.c | 22 +++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)
Index: linux/kernel/sched.c
===================================================================
--- linux.orig/kernel/sched.c
+++ linux/kernel/sched.c
@@ -2591,17 +2591,21 @@ static void idle_balance(int this_cpu, s
unsigned long next_balance = jiffies + HZ;
for_each_domain(this_cpu, sd) {
- if (sd->flags & SD_BALANCE_NEWIDLE) {
+ unsigned long interval;
+
+ if (!(sd->flags & SD_LOAD_BALANCE))
+ continue;
+
+ if (sd->flags & SD_BALANCE_NEWIDLE)
/* If we've pulled tasks over stop searching: */
pulled_task = load_balance_newidle(this_cpu,
- this_rq, sd);
- if (time_after(next_balance,
- sd->last_balance + sd->balance_interval))
- next_balance = sd->last_balance
- + sd->balance_interval;
- if (pulled_task)
- break;
- }
+ this_rq, sd);
+
+ interval = msecs_to_jiffies(sd->balance_interval);
+ if (time_after(next_balance, sd->last_balance + interval))
+ next_balance = sd->last_balance + interval;
+ if (pulled_task)
+ break;
}
if (pulled_task || time_after(jiffies, this_rq->next_balance)) {
/*
next prev parent reply other threads:[~2007-06-19 8:09 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20070613180451.GA16628@elte.hu>
[not found] ` <20070613184741.GC8125@linux.vnet.ibm.com>
[not found] ` <20070613185522.GA27335@elte.hu>
[not found] ` <20070613233910.GJ8125@linux.vnet.ibm.com>
[not found] ` <20070615144535.GA12078@elte.hu>
[not found] ` <20070615151452.GC9301@linux.vnet.ibm.com>
[not found] ` <20070615195545.GA28872@elte.hu>
[not found] ` <20070616011605.GH9301@linux.vnet.ibm.com>
[not found] ` <20070616084434.GG2559@linux.vnet.ibm.com>
[not found] ` <20070616161213.GA2994@linux.vnet.ibm.com>
2007-06-18 15:12 ` v2.6.21.4-rt11 Srivatsa Vaddagiri
2007-06-18 16:54 ` v2.6.21.4-rt11 Christoph Lameter
2007-06-18 17:35 ` v2.6.21.4-rt11 Srivatsa Vaddagiri
2007-06-18 17:59 ` v2.6.21.4-rt11 Christoph Lameter
2007-06-19 1:52 ` v2.6.21.4-rt11 Srivatsa Vaddagiri
2007-06-19 2:13 ` v2.6.21.4-rt11 Siddha, Suresh B
2007-06-19 2:15 ` v2.6.21.4-rt11 Siddha, Suresh B
2007-06-19 3:46 ` v2.6.21.4-rt11 Christoph Lameter
2007-06-19 5:49 ` v2.6.21.4-rt11 Srivatsa Vaddagiri
2007-06-19 8:07 ` Ingo Molnar [this message]
2007-06-18 18:06 ` v2.6.21.4-rt11 Srivatsa Vaddagiri
2007-06-19 9:04 ` v2.6.21.4-rt11 Ingo Molnar
2007-06-19 10:43 ` v2.6.21.4-rt11 Srivatsa Vaddagiri
2007-06-19 14:33 ` v2.6.21.4-rt11 Srivatsa Vaddagiri
2007-06-19 19:15 ` v2.6.21.4-rt11 Christoph Lameter
2007-06-19 15:08 ` v2.6.21.4-rt11 Paul E. McKenney
2007-06-19 19:14 ` v2.6.21.4-rt11 Christoph Lameter
2007-06-10 17:50 v2.6.21.4-rt11 Miguel Botón
-- strict thread matches above, loose matches on Subject: below --
2007-06-09 21:05 v2.6.21.4-rt11 Ingo Molnar
2007-06-11 1:19 ` v2.6.21.4-rt11 Paul E. McKenney
2007-06-11 7:36 ` v2.6.21.4-rt11 Ingo Molnar
2007-06-11 14:44 ` v2.6.21.4-rt11 Paul E. McKenney
2007-06-11 15:38 ` v2.6.21.4-rt11 Ingo Molnar
2007-06-11 15:55 ` v2.6.21.4-rt11 Paul E. McKenney
2007-06-11 17:18 ` v2.6.21.4-rt11 Paul E. McKenney
2007-06-11 20:44 ` v2.6.21.4-rt11 Paul E. McKenney
2007-06-11 22:18 ` v2.6.21.4-rt11 Paul E. McKenney
2007-06-12 21:37 ` v2.6.21.4-rt11 Ingo Molnar
2007-06-13 1:27 ` v2.6.21.4-rt11 Paul E. McKenney
2007-06-12 6:03 ` v2.6.21.4-rt11 Eric St-Laurent
2007-06-12 7:32 ` v2.6.21.4-rt11 Ingo Molnar
2007-06-12 13:00 ` v2.6.21.4-rt11 Pallipadi, Venkatesh
2007-06-13 1:37 ` v2.6.21.4-rt11 Eric St-Laurent
2007-06-17 16:15 ` v2.6.21.4-rt11 Nelson Castillo
2007-06-17 16:43 ` v2.6.21.4-rt11 Thomas Gleixner
2007-06-17 16:49 ` v2.6.21.4-rt11 Nelson Castillo
2007-06-17 16:59 ` v2.6.21.4-rt11 Thomas Gleixner
2007-06-18 16:14 ` v2.6.21.4-rt11 Katsuya MATSUBARA
2007-06-19 4:04 ` v2.6.21.4-rt11 Thomas Gleixner
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=20070619080737.GB22371@elte.hu \
--to=mingo@elte.hu \
--cc=akpm@linux-foundation.org \
--cc=clameter@sgi.com \
--cc=dino@in.ibm.com \
--cc=dmitry.adamushko@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=paulmck@linux.vnet.ibm.com \
--cc=pwil3058@bigpond.net.au \
--cc=suresh.b.siddha@intel.com \
--cc=tglx@linutronix.de \
--cc=vatsa@linux.vnet.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
all inboxes | Powered by JetHome®