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

On Sun, May 25, 2008 at 06:32:35PM -0700, Dennis Ferguson wrote:
> 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.

I'm quoting the wording of SUS of setitimer(2) here.

> 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.

The problem with using uptime is that it won't help for stepping in the
time as done e.g. by settimeofday. This matches the description of
clock_gettime. The uptime behavior would match the non-existing
ITIMER_MONOTONIC. That doesn't make a difference during normal
operation, but as soon as e.g. the system can be suspended for arbitrary
intervals, it becomes quite obvious.

Given the guarantied reslution of 1/HZ only the effect of phase
adjustments should be irrelevant.


Home | Main Index | Thread Index | Old Index