From: Nikhil Rao <ncrao@google.com>
To: Ingo Molnar <mingo@elte.hu>,
Peter Zijlstra <peterz@infradead.org>,
Mike Galbraith <efault@gmx.de>
Cc: Venkatesh Pallipadi <venki@google.com>,
linux-kernel@vger.kernel.org, Nikhil Rao <ncrao@google.com>
Subject: [PATCH] sched: fix updating sd->balance_interval in idle_balance()
Date: Wed, 19 May 2010 16:45:30 -0700 [thread overview]
Message-ID: <1274312730-3041-1-git-send-email-ncrao@google.com> (raw)
sd->balance_interval is updated incorrectly when SD_BALANCE_NEWIDLE is not set
in sd->flags. This patch updates sd->balance_interval only when we balance the
domain.
Signed-off-by: Nikhil Rao <ncrao@google.com>
---
kernel/sched_fair.c | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index 217e4a9..c35fe47 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -2996,11 +2996,12 @@ static void idle_balance(int this_cpu, struct rq *this_rq)
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(this_cpu, this_rq,
- sd, CPU_NEWLY_IDLE, &balance);
- }
+ if (!(sd->flags & SD_BALANCE_NEWIDLE))
+ continue;
+
+ /* If we've pulled tasks over stop searching: */
+ pulled_task = load_balance(this_cpu, this_rq, sd,
+ CPU_NEWLY_IDLE, &balance);
interval = msecs_to_jiffies(sd->balance_interval);
if (time_after(next_balance, sd->last_balance + interval))
--
1.7.0.1
next reply other threads:[~2010-05-19 23:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-19 23:45 Nikhil Rao [this message]
2010-05-20 7:16 ` 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=1274312730-3041-1-git-send-email-ncrao@google.com \
--to=ncrao@google.com \
--cc=efault@gmx.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=venki@google.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®