Re: [patch 00/21] hrtimer - High-resolution timer subsystem

From: George Anzinger
Date: Wed Dec 14 2005 - 21:30:30 EST


Roman Zippel wrote:
Hi,

On Mon, 12 Dec 2005, George Anzinger wrote:


My $0.02 worth: It is clear (from the standard) that the initial time is to be
ABS_TIME.


Yes.


It is also clear that the interval is to be added to that time.


Not necessarily. It says it_interval is a "reload value", it's used to reload the timer to count down to the next expiration.
It's up to the implementation, whether it really counts down this time or whether it converts it first into an absolute value.


IMHO then, the result should have the same property, i.e. ABS_TIME. Sort of
like adding an offset to a relative address. The result is still relative.


If the result is relative, why should have a clock set any effect?
IMO the spec makes it quite clear that initial timer and the periodic timer are two different types of the timer. The initial timer only specifies how the periodic timer is started and the periodic timer itself is a "relative time service".

Well, I guess we will have to agree to disagree. That which the interval is added to is an absolute time, so I, and others, take the result as absolute. At this point there really is no "conversion" to an absolute timer. Once the timer initial time is absolute, everything derived from it, i.e. all intervals added to it, must be absolute.

For what its worth, I do think that the standards folks could have done a bit better here. I, for example, would have liked to have seen a discussion about what to do with overrun in the face of clock setting.


--
George Anzinger george@xxxxxxxxxx
HRT (High-res-timers): http://sourceforge.net/projects/high-res-timers/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/