[PATCH 35/41] sched: Update rq clock before idle balancing
Frederic Weisbecker
fweisbec at gmail.com
Mon Apr 30 23:55:09 UTC 2012
idle_balance() is called from schedule() right before we schedule the
idle task. It needs to record the idle timestamp at that time and for
this the rq clock must be accurate. If the CPU is running tickless
we need to update the rq clock manually.
Signed-off-by: Frederic Weisbecker <fweisbec at gmail.com>
Cc: Alessio Igor Bogani <abogani at kernel.org>
Cc: Andrew Morton <akpm at linux-foundation.org>
Cc: Avi Kivity <avi at redhat.com>
Cc: Chris Metcalf <cmetcalf at tilera.com>
Cc: Christoph Lameter <cl at linux.com>
Cc: Daniel Lezcano <daniel.lezcano at linaro.org>
Cc: Geoff Levand <geoff at infradead.org>
Cc: Gilad Ben Yossef <gilad at benyossef.com>
Cc: Hakan Akkan <hakanakkan at gmail.com>
Cc: Ingo Molnar <mingo at kernel.org>
Cc: Kevin Hilman <khilman at ti.com>
Cc: Max Krasnyansky <maxk at qualcomm.com>
Cc: Paul E. McKenney <paulmck at linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz at infradead.org>
Cc: Stephen Hemminger <shemminger at vyatta.com>
Cc: Steven Rostedt <rostedt at goodmis.org>
Cc: Sven-Thorsten Dietrich <thebigcorporation at gmail.com>
Cc: Thomas Gleixner <tglx at linutronix.de>
---
kernel/sched/fair.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index eff80e0..cd871e7 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -4638,6 +4638,7 @@ void idle_balance(int this_cpu, struct rq *this_rq)
int pulled_task = 0;
unsigned long next_balance = jiffies + HZ;
+ update_nohz_rq_clock(this_rq);
this_rq->idle_stamp = this_rq->clock;
if (this_rq->avg_idle < sysctl_sched_migration_cost)
--
1.7.5.4
More information about the linaro-sched-sig
mailing list