sched/fair: Update rq clock before updating nohz CPU load
authorMatt Fleming <matt@codeblueprint.co.uk>
Tue, 3 May 2016 19:46:54 +0000 (20:46 +0100)
committerIngo Molnar <mingo@kernel.org>
Thu, 5 May 2016 07:41:09 +0000 (09:41 +0200)
commitb52fad2db5d792d89975cebf2fe1646a7af28ed0
treeeaafdb6969218814341d8e8f8da18487fc5e0bce
parentdb6ea2fb094fb3a6afc36d3e4229bc162638ad24
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().

Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Wanpeng Li <wanpeng.li@hotmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Mike Galbraith <umgwanakikbuti@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rik van Riel <riel@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1462304814-11715-1-git-send-email-matt@codeblueprint.co.uk
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/sched/fair.c