On Thu, 2004-05-06 at 17:33, George Anzinger wrote:
john stultz wrote:
Roughly, I'd like to see the time code for all arches in 2.7 to look
like:
u64 system_time /* NTP adjusted nanosecs since boot */
u64 wall_time_offset /* offset to system_time for time of day */
u64 offset_base /* last read raw hw value */
Hm. In 2.6 we use an NTP adjusted wall time and a wall_to_monotonic offset. I don't really see the advantage here. Does this change buy us something?
For what its worth, I introduced the wall_to_monotonic offset just because it was easier to do (and understand, I think) in the current kernel.
Well, in my opinion it seems much cleaner. Right now any time we adjust
xtime, we have to remember to adjust wall_to_monotonic. I believe we've
had issues where a change was made to just one and not the other.
This is easier and has simpler rules. system_time always increments and
is only modified by the periodic time_interrupt_hook(). Then
wall_time_offset is only changes by do_settimeofday(). In fact, I hope
to make these values static to the time code, so that all in-kernel
users must go through the monotonic_clock() and do_gettimeofday()
interfaces.