linux/kernel/time
Linus Torvalds 83f57a11d8 Revert "time: Remove xtime_cache"
This reverts commit 7bc7d63745, as
requested by John Stultz. Quoting John:

 "Petr Titěra reported an issue where he saw odd atime regressions with
  2.6.33 where there were a full second worth of nanoseconds in the
  nanoseconds field.

  He also reviewed the time code and narrowed down the problem: unhandled
  overflow of the nanosecond field caused by rounding up the
  sub-nanosecond accumulated time.

  Details:

   * At the end of update_wall_time(), we currently round up the
  sub-nanosecond portion of accumulated time when storing it into xtime.
  This was added to avoid time inconsistencies caused when the
  sub-nanosecond portion was truncated when storing into xtime.
  Unfortunately we don't handle the possible second overflow caused by
  that rounding.

   * Previously the xtime_cache code hid this overflow by normalizing the
  xtime value when storing into the xtime_cache.

   * We could try to handle the second overflow after the rounding up, but
  since this affects the timekeeping's internal state, this would further
  complicate the next accumulation cycle, causing small errors in ntp
  steering. As much as I'd like to get rid of it, the xtime_cache code is
  known to work.

   * The correct fix is really to include the sub-nanosecond portion in the
  timekeeping accessor function, so we don't need to round up at during
  accumulation. This would greatly simplify the accumulation code.
  Unfortunately, we can't do this safely until the last three
  non-GENERIC_TIME arches (sparc32, arm, cris) are converted  (those
  patches are in -mm) and we kill off the spots where arches set xtime
  directly. This is all 2.6.34 material, so I think reverting the
  xtime_cache change is the best approach for now.

  Many thanks to Petr for both reporting and finding the issue!"

Reported-by: Petr Titěra <P.Titera@century.cz>
Requested-by: john stultz <johnstul@us.ibm.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-22 14:10:37 -08: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
clockevents.c Merge branch 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-12-19 09:47:18 -08:00
clocksource.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2009-12-09 19:43:33 -08:00
jiffies.c clocksource: Cleanup clocksource selection 2009-08-15 10:55:46 +02:00
ntp.c timekeeping: Introduce timekeeping_leap_insert 2009-08-15 10:55:45 +02:00
tick-broadcast.c clockevents: Convert to raw_spinlock 2009-12-14 23:55:34 +01:00
tick-common.c clockevents: Convert to raw_spinlock 2009-12-14 23:55:34 +01:00
tick-internal.h clockevents: Make tick_device_lock static 2009-12-14 23:55:34 +01:00
tick-oneshot.c nohz: Allow 32-bit machines to sleep for more than 2.15 seconds 2009-11-13 20:46:24 +01:00
tick-sched.c Merge branch 'timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-12-08 19:27:08 -08:00
timecompare.c timecompare: fix half-Y2K38 problem in timecompare_update while calculating offset 2009-12-16 07:19:57 -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 Revert "time: Remove xtime_cache" 2009-12-22 14:10:37 -08:00
timer_list.c cpumask: avoid dereferencing struct cpumask 2009-12-17 11:43:29 +10:30
timer_stats.c hrtimers: Convert to raw_spinlocks 2009-12-14 23:55:34 +01:00