public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [RFC][PATCH] linux-2.5.64_monotonic-clock_A1
@ 2003-03-12  2:57 Jim Houston
  0 siblings, 0 replies; 8+ messages in thread
From: Jim Houston @ 2003-03-12  2:57 UTC (permalink / raw)
  To: johnstul; +Cc: george, linux-kernel

Hi John,

I like the idea of making the monotonic clock use the same
mechanism as the normal timeofday clock.

When I was doing my alternative Posix timers patch, I modified
your get_offset() mechanism to return nanoseconds and added a
"struct time_spec ytime" which was updated in the same place as
xtime but was never set.

You might have a look at my patch archived here:
  http://marc.theaimsgroup.com/?l=linux-kernel&m=104006731324824&w=2

Look for the function do_gettime_sinceboot_ns().  You don't have to 
keep the monotonic time in cycles.  It
would be nice if the timeofday clock was defined as the monotonic
clock + an offset.

Also, if I had one of those cyclone counters, I would never look at
the PIT again.

Jim Houston - Concurrent Computer Corp.

^ permalink raw reply	[flat|nested] 8+ messages in thread
* [RFC][PATCH] linux-2.5.64_monotonic-clock_A1
@ 2003-03-11 19:39 john stultz
  2003-03-11 19:40 ` john stultz
  0 siblings, 1 reply; 8+ messages in thread
From: john stultz @ 2003-03-11 19:39 UTC (permalink / raw)
  To: lkml; +Cc: Joel.Becker, Martin J. Bligh, wim.coekaerts

[-- Attachment #1: Type: text/plain, Size: 1225 bytes --]

All, 
	Here is the next rev of my monotonic-clock patch. This version uses
scaled math to avoid the costly 64 bit divide at interrupt time. Big
thanks to George Anzinger for the suggestion.

	This patch, written with the advice of Joel Becker, addresses a problem
with the hangcheck-timer. The basic problem is that the hangcheck-timer
code (Required for Oracle) needs a accurate hard clock which can be used
to detect OS stalls (due to udelay() or pci bus hangs) that would cause
system time to skew (its sort of a sanity check that insures the
system's notion of time is accurate). However, currently they are using
get_cycles() to fetch the cpu's TSC register, thus this does not work on
systems w/o a synced TSC. As suggested by Andi Kleen (see thread here:
http://www.uwsg.iu.edu/hypermail/linux/kernel/0302.0/1234.html ) I've
worked with Joel and others to implement the monotonic_clock()
interface.

This interface returns a unsigned long long representing the number of
nanoseconds that has passed since time_init(). 

Future plans to the interface include properly handling cpu_freq changes
and porting to the different arches.

Comments, suggestions and flames welcome.

thanks
-john



[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 232 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2003-03-12  2:46 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-12  2:57 [RFC][PATCH] linux-2.5.64_monotonic-clock_A1 Jim Houston
  -- strict thread matches above, loose matches on Subject: below --
2003-03-11 19:39 john stultz
2003-03-11 19:40 ` john stultz
2003-03-11 21:47   ` george anzinger
2003-03-11 21:58     ` john stultz
2003-03-11 22:39       ` george anzinger
2003-03-11 22:59         ` john stultz
2003-03-11 23:44           ` george anzinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox