[PATCH] HZ free ntp
Distangle the NTP update from HZ. This is necessary for dynamic tick enabled kernels. Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@elte.hu> Cc: john stultz <johnstul@us.ibm.com> Cc: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
771ee3b04e
commit
f4304ab215
@ -128,15 +128,20 @@ EXPORT_SYMBOL_GPL(ktime_get_ts);
|
||||
static void hrtimer_get_softirq_time(struct hrtimer_base *base)
|
||||
{
|
||||
ktime_t xtim, tomono;
|
||||
struct timespec xts;
|
||||
unsigned long seq;
|
||||
|
||||
do {
|
||||
seq = read_seqbegin(&xtime_lock);
|
||||
xtim = timespec_to_ktime(xtime);
|
||||
tomono = timespec_to_ktime(wall_to_monotonic);
|
||||
|
||||
#ifdef CONFIG_NO_HZ
|
||||
getnstimeofday(&xts);
|
||||
#else
|
||||
xts = xtime;
|
||||
#endif
|
||||
} while (read_seqretry(&xtime_lock, seq));
|
||||
|
||||
xtim = timespec_to_ktime(xts);
|
||||
tomono = timespec_to_ktime(wall_to_monotonic);
|
||||
base[CLOCK_REALTIME].softirq_time = xtim;
|
||||
base[CLOCK_MONOTONIC].softirq_time = ktime_add(xtim, tomono);
|
||||
}
|
||||
|
Reference in New Issue
Block a user