hrtimer: Make offset update smarter
authorThomas Gleixner <[email protected]>
Tue, 14 Apr 2015 21:08:37 +0000 (21:08 +0000)
committerThomas Gleixner <[email protected]>
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 <[email protected]>
Reviewed-by: Preeti U Murthy <[email protected]>
Acked-by: Peter Zijlstra <[email protected]>
Cc: Viresh Kumar <[email protected]>
Cc: Marcelo Tosatti <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: John Stultz <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Thomas Gleixner <[email protected]>
Cc: John Stultz <[email protected]>
include/linux/hrtimer.h
include/linux/timekeeper_internal.h
kernel/time/hrtimer.c
kernel/time/timekeeping.c
kernel/time/timekeeping.h