tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Bug fix for PR 26470 for review



That patch is much better.

On 11 Jan 2009, at 22:38 , Joerg Sonnenberger wrote:
Well, setitimer is supposed to change with the real time and I would
argue that settimeofday modifies the real time.


I think you are confusing real time with real time intervals.  The two
are different enough that timekeeping conferences mention them as separate
topics, e.g.

     http://tycho.usno.navy.mil/ptti.html

Real time has phase and frequency (or rate of advance or, for interval timers, rate of decrement) components while real time intervals are independent of phase and depend on rate of advance alone. settimeofday() only makes time phase adjustments, the time intervals setitimer() deals with are (or should be) independent of these. If you want a timescale where the difference between two timestamps reliably reflects the interval between them you can't use a timescale which is subject to phase adjustments, which is why the kernel uptime
works here while kernel time is a bit broken.

I am very sure that this code is exactly the place for which uptime is
appropriate (I notice FreeBSD agrees with that, now that I've looked), but this topic is esoteric and the difference is small enough that it probably
doesn't matter so I'll leave it at that.

Dennis Ferguson



Home | Main Index | Thread Index | Old Index