Re: [RFC][PATCH] linux-2.5.64_monotonic-clock_A1

From: john stultz (johnstul@us.ibm.com)
Date: Tue Mar 11 2003 - 17:59:13 EST


On Tue, 2003-03-11 at 14:39, george anzinger wrote:

> I must have confused you. I am woking on a get time of day sort of
> thing. In time.c, the gettimeofday code calls get_offset() and then
> adds in lost ticks (ticks clocked by the PIT interrupt but not yet
> rolled into the wall clock (xtime). I was thinking that get_offset
> might be defined to add this its result.

I'm still not quite following that. But as long as we're both pointing
at the same code and grunting in agreement I think I'll just let it
slide ;)

> But, back to the problem I am trying to solve. The posixtimers code
> is in the common kernel and needs the result returned by get_offset
> OR, we could define a new function, get_monotonictimeofday(), which
> returns the jiffies since boot + get_offset() + pending ticks (i.e. it
> would be the same as gettimeofday except it would use jiffies_64
> instead of xtime to get its result. The format would be a timespec,
> i.e. the same as xtime.

Actually, what is the difference between the call you're trying to
implement and monotonic_clock() (outside of the timespec return)? Could
you point me to the specific code you are describing? It sounds like
we're working on basically the same solution from two different angles.

> This translates directly into a system call and is also used in the
> timers code to convert from wall clock time to jiffies time for timers.
>
> Either way, we have a bit of a mess due to the arch dependency. I
> don't really care which way it goes, but I do think it should be
> resolved in 2.5.

Well, if the generic interfaces aren't providing what you need, then a
new interface needs to be considered. This is precisely what the
hangcheck-timer code ran into, and is why we're working on this
monotonic_clock() code (which is intended be arch independent in the
future).

thanks
-john



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



This archive was generated by hypermail 2b29 : Sat Mar 15 2003 - 22:00:28 EST