[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1462304814-11715-1-git-send-email-matt@codeblueprint.co.uk>
Date: Tue, 3 May 2016 20:46:54 +0100
From: Matt Fleming <matt@...eblueprint.co.uk>
To: Ingo Molnar <mingo@...nel.org>,
Peter Zijlstra <peterz@...radead.org>
Cc: linux-kernel@...r.kernel.org,
Matt Fleming <matt@...eblueprint.co.uk>,
Mike Galbraith <umgwanakikbuti@...il.com>,
Mel Gorman <mgorman@...hsingularity.net>,
Thomas Gleixner <tglx@...utronix.de>,
Frederic Weisbecker <fweisbec@...il.com>,
Rik van Riel <riel@...hat.com>
Subject: [PATCH] sched/fair: Update rq clock before updating nohz cpu load
If we're accessing rq_clock() (e.g. in sched_avg_update()) we should
update the rq clock before calling cpu_load_update(), otherwise any
time calculations will be stale.
All other paths currently call update_rq_clock().
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Ingo Molnar <mingo@...nel.org>
Cc: Mike Galbraith <umgwanakikbuti@...il.com>
Cc: Mel Gorman <mgorman@...hsingularity.net>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: Frederic Weisbecker <fweisbec@...il.com>
Cc: Rik van Riel <riel@...hat.com>
Signed-off-by: Matt Fleming <matt@...eblueprint.co.uk>
---
kernel/sched/fair.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index b8a33abce650..aa9ba82f0d7c 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -4723,6 +4723,7 @@ void cpu_load_update_nohz_stop(void)
load = weighted_cpuload(cpu_of(this_rq));
raw_spin_lock(&this_rq->lock);
+ update_rq_clock(this_rq);
cpu_load_update_nohz(this_rq, curr_jiffies, load);
raw_spin_unlock(&this_rq->lock);
}
--
2.7.3
Powered by blists - more mailing lists