From: tip-bot for Vincent Guittot <vincent.guittot@linaro.org>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org,
a.p.zijlstra@chello.nl, vincent.guittot@linaro.org,
suresh.b.siddha@intel.com, tglx@linutronix.de, venki@google.com
Subject: [tip:sched/core] sched: Fix nohz_idle_balance()
Date: Thu, 13 Sep 2012 23:12:17 -0700 [thread overview]
Message-ID: <tip-5ed4f1d96deee82ee92cd1ac1e0108c27e80e9b0@git.kernel.org> (raw)
In-Reply-To: <1347509486-8688-1-git-send-email-vincent.guittot@linaro.org>
Commit-ID: 5ed4f1d96deee82ee92cd1ac1e0108c27e80e9b0
Gitweb: http://git.kernel.org/tip/5ed4f1d96deee82ee92cd1ac1e0108c27e80e9b0
Author: Vincent Guittot <vincent.guittot@linaro.org>
AuthorDate: Thu, 13 Sep 2012 06:11:26 +0200
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Thu, 13 Sep 2012 16:52:03 +0200
sched: Fix nohz_idle_balance()
On tickless systems, one CPU runs load balance for all idle CPUs.
The cpu_load of this CPU is updated before starting the load balance
of each other idle CPUs. We should instead update the cpu_load of
the balance_cpu.
Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Venkatesh Pallipadi <venki@google.com>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Link: http://lkml.kernel.org/r/1347509486-8688-1-git-send-email-vincent.guittot@linaro.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
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 1ca4fe4..9ae3a5b 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -4794,14 +4794,15 @@ static void nohz_idle_balance(int this_cpu, enum cpu_idle_type idle)
if (need_resched())
break;
- raw_spin_lock_irq(&this_rq->lock);
- update_rq_clock(this_rq);
- update_idle_cpu_load(this_rq);
- raw_spin_unlock_irq(&this_rq->lock);
+ rq = cpu_rq(balance_cpu);
+
+ raw_spin_lock_irq(&rq->lock);
+ update_rq_clock(rq);
+ update_idle_cpu_load(rq);
+ raw_spin_unlock_irq(&rq->lock);
rebalance_domains(balance_cpu, CPU_IDLE);
- rq = cpu_rq(balance_cpu);
if (time_after(this_rq->next_balance, rq->next_balance))
this_rq->next_balance = rq->next_balance;
}
prev parent reply other threads:[~2012-09-14 6:12 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-13 4:11 [RFC] sched: nohz_idle_balance Vincent Guittot
2012-09-13 6:49 ` Mike Galbraith
2012-09-13 8:19 ` Peter Zijlstra
2012-09-13 10:29 ` Mike Galbraith
2012-09-13 13:41 ` Rakib Mullick
[not found] ` <CAKfTPtBQ7Y1xGOe9NZw8AhNbOzGgkVMgYyXjVa1d308kdG6bfQ@mail.gmail.com>
[not found] ` <1347521382.6821.61.camel@marge.simpson.net>
[not found] ` <CAKfTPtCvg1qxUv02-dO9qD2HiFzS_bA2Gr0mrN=8LEA3eXA7Bg@mail.gmail.com>
[not found] ` <1347522994.6821.67.camel@marge.simpson.net>
2012-09-13 8:37 ` Vincent Guittot
2012-09-13 8:45 ` Peter Zijlstra
2012-09-13 8:53 ` Peter Zijlstra
2012-09-13 8:18 ` Peter Zijlstra
2012-09-14 6:12 ` tip-bot for Vincent Guittot [this message]
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=tip-5ed4f1d96deee82ee92cd1ac1e0108c27e80e9b0@git.kernel.org \
--to=vincent.guittot@linaro.org \
--cc=a.p.zijlstra@chello.nl \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=suresh.b.siddha@intel.com \
--cc=tglx@linutronix.de \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.