From f4304ab21513b834c8fe3403927c60c2b81a72d7 Mon Sep 17 00:00:00 2001 From: john stultz Date: Fri, 16 Feb 2007 01:27:26 -0800 Subject: [PATCH] HZ free ntp Distangle the NTP update from HZ. This is necessary for dynamic tick enabled kernels. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: john stultz Cc: Roman Zippel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/timex.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/linux/timex.h') diff --git a/include/linux/timex.h b/include/linux/timex.h index 9a24e500c311..da929dbbea2a 100644 --- a/include/linux/timex.h +++ b/include/linux/timex.h @@ -286,6 +286,13 @@ static inline void time_interpolator_update(long delta_nsec) #define TICK_LENGTH_SHIFT 32 +#ifdef CONFIG_NO_HZ +#define NTP_INTERVAL_FREQ (2) +#else +#define NTP_INTERVAL_FREQ (HZ) +#endif +#define NTP_INTERVAL_LENGTH (NSEC_PER_SEC/NTP_INTERVAL_FREQ) + /* Returns how long ticks are at present, in ns / 2^(SHIFT_SCALE-10). */ extern u64 current_tick_length(void); -- cgit v1.2.3-59-g8ed1b