linux-uconsole/kernel/time
Kasper Pedersen a6d553ac64 time: Compensate for rounding on odd-frequency clocksources
commit a386b5af8e upstream.

When the clocksource is not a multiple of HZ, the clock will be off.  For
acpi_pm, HZ=1000 the error is 127.111 ppm:

The rounding of cycle_interval ends up generating a false error term in
ntp_error accumulation since xtime_interval is not exactly 1/HZ.  So, we
subtract out the error caused by the rounding.

This has been visible since 2.6.32-rc2
	commit a092ff0f90
	time: Implement logarithmic time accumulation
That commit raised NTP_INTERVAL_FREQ and exposed the rounding error.

testing tool: http://n1.taur.dk/permanent/testpmt.c
Also tested with ntpd and a frequency counter.

Signed-off-by: Kasper Pedersen <kkp2010@kasperkp.dk>
Acked-by: john stultz <johnstul@us.ibm.com>
Cc: John Kacur <jkacur@redhat.com>
Cc: Clark Williams <williams@redhat.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Will Tisdale <willtisdale@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-23 15:24:09 -07:00
..
clockevents.c clockevents: Add missing include to pacify sparse 2010-01-28 15:00:24 -08:00
clocksource.c clocksource: Install completely before selecting 2011-05-23 11:20:19 -07:00
jiffies.c clocksource: Cleanup clocksource selection 2009-08-15 10:55:46 +02:00
Kconfig Kconfig: eliminate "def_bool n" constructs 2008-10-16 11:21:31 -07:00
Makefile time: add function to convert between calendar time and broken-down time for universal use 2009-09-24 07:20:56 -07:00
ntp.c timekeeping: Introduce timekeeping_leap_insert 2009-08-15 10:55:45 +02:00
tick-broadcast.c tick: Clear broadcast active bit when switching to oneshot 2011-05-23 11:20:19 -07:00
tick-common.c clockevents: Prevent oneshot mode when broadcast device is periodic 2011-03-07 15:17:54 -08:00
tick-internal.h clockevents: Prevent oneshot mode when broadcast device is periodic 2011-03-07 15:17:54 -08:00
tick-oneshot.c clocksource: prevent selection of low resolution clocksourse also for nohz=on 2009-06-13 12:00:26 +02:00
tick-sched.c nohz: Reuse ktime in sub-functions of tick_check_idle. 2010-08-13 13:20:13 -07:00
timecompare.c timecompare: generic infrastructure to map between two time bases 2009-02-15 22:43:32 -08:00
timeconv.c time: add function to convert between calendar time and broken-down time for universal use 2009-09-24 07:20:56 -07:00
timekeeping.c time: Compensate for rounding on odd-frequency clocksources 2011-06-23 15:24:09 -07:00
timer_list.c hrtimer: Tune hrtimer_interrupt hang logic 2010-04-01 15:58:14 -07:00
timer_stats.c const: constify remaining file_operations 2009-10-01 16:11:11 -07:00