lkml.org 
[lkml]   [2005]   [Sep]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [ANNOUNCE] ktimers subsystem
Christoph Lameter wrote:
> On Mon, 19 Sep 2005 tglx@linutronix.de wrote:
>
>
>>sources. Another astonishing implementation detail of the current time
>>keeping is the fact that we get the monotonic clock (defined by POSIX as
>>a continuous clock source which can not be set) by subtracting a variable
>>offset from the real time clock, which can be set by the user and
>>corrected by NTP or other mechanisms.

Why is this astonishing? What it really indicates is the nature of
Linux where in we have just (with 2.6) introduced the concept of
monotonic time. As such, and with few users, it made a LOT of sense to
not upset too much code by making it the primary clock. In the end, the
difference between the two clocks is a constant offset and it is only an
add in one path or the other.

An argument from the other side is that ntp works with CLOCK_REALTIME
and so that is where and what it corrects.

Agreed, this can be turned around, however, one needs folks like John
Stultz who take the time to understand ntp as well as all the other
clock issues to turn things like this around. Still, we should consider
carefully IF we want to turn it around.

A far more astonishing thing, IMHO, is the cascade in the timers code...
>
>
> The benefit or drawback of that implementation depends which time is more
> important: realtime or monotonic time. I think the most used time value is
> realtime and not monotonic time. Having the real time value in xtime
> saves one addition when retrieving realtime.
> -
Both sides of this argument have merit. Much as we would like to, we
can not change user usage. AND, in the end, they are, and will continue
to make far more calls to get the time than the kernel does. So, in raw
cpu power (or time) consumed, the user get time will win over kernel
usage. Also, the time to do a gettimeofday is easily computed with the
most simple program...
--
George Anzinger george@mvista.com
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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-09-20 12:07    [W:0.354 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site