summaryrefslogtreecommitdiffstats
path: root/kernel/time/timekeeping.h
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2015-04-14 21:08:37 +0000
committerThomas Gleixner <tglx@linutronix.de>2015-04-22 17:06:49 +0200
commit868a3e915f7f5eba8f8cb4f7da2276760807c51c (patch)
treedcec10d02c9613b5cad4f32d6d3ed7352825b1c8 /kernel/time/timekeeping.h
parent21d6d52a1b7028e6a6840bd82e354aefa9a5e203 (diff)
downloadop-kernel-dev-868a3e915f7f5eba8f8cb4f7da2276760807c51c.zip
op-kernel-dev-868a3e915f7f5eba8f8cb4f7da2276760807c51c.tar.gz
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>
Diffstat (limited to 'kernel/time/timekeeping.h')
-rw-r--r--kernel/time/timekeeping.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/kernel/time/timekeeping.h b/kernel/time/timekeeping.h
index 4d177fc..704f595 100644
--- a/kernel/time/timekeeping.h
+++ b/kernel/time/timekeeping.h
@@ -3,9 +3,10 @@
/*
* Internal interfaces for kernel/time/
*/
-extern ktime_t ktime_get_update_offsets_now(ktime_t *offs_real,
- ktime_t *offs_boot,
- ktime_t *offs_tai);
+extern ktime_t ktime_get_update_offsets_now(unsigned int *cwsseq,
+ ktime_t *offs_real,
+ ktime_t *offs_boot,
+ ktime_t *offs_tai);
extern int timekeeping_valid_for_hres(void);
extern u64 timekeeping_max_deferment(void);
OpenPOWER on IntegriCloud