]> git.karo-electronics.de Git - karo-tx-linux.git/commit
hrtimer: Make offset update smarter
authorThomas Gleixner <tglx@linutronix.de>
Tue, 14 Apr 2015 21:08:37 +0000 (21:08 +0000)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 22 Apr 2015 15:06:49 +0000 (17:06 +0200)
commit868a3e915f7f5eba8f8cb4f7da2276760807c51c
treedcec10d02c9613b5cad4f32d6d3ed7352825b1c8
parent21d6d52a1b7028e6a6840bd82e354aefa9a5e203
hrtimer: Make offset update smarter

On every tick/hrtimer interrupt we update the offset variables of the
clock bases. That's silly because these offsets change very seldom.

Add a sequence counter to the time keeping code which keeps track of
the offset updates (clock_was_set()). Have a sequence cache in the
hrtimer cpu bases to evaluate whether the offsets must be updated or
not. This allows us later to avoid pointless cacheline pollution.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Preeti U Murthy <preeti@linux.vnet.ibm.com>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: John Stultz <john.stultz@linaro.org>
Link: http://lkml.kernel.org/r/20150414203501.132820245@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: John Stultz <john.stultz@linaro.org>
include/linux/hrtimer.h
include/linux/timekeeper_internal.h
kernel/time/hrtimer.c
kernel/time/timekeeping.c
kernel/time/timekeeping.h