lkml.org 
[lkml]   [1998]   [Jun]   [15]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateSun, 14 Jun 1998 22:50:07 -0600 (MDT)
FromColin Plumb <>
Subject/dev/tsc and timekeeping
Included here is a small patch to add an interesting interrupt-latency
measuring hack to the kernel.  It's not ready for prime time, but might
be fun to play with.

It's for x86 processors with a timestamp counter, and simply captures
the the TSC on every clock interrupt and puts it in a circular buffer.
Readers can read arbitrary amounts from it.  Hopefully I implemented
poll() correctly.  The data you read starts from the moment you open()
the device.

One thing I did was I put readers wanting a lot of data on a separate
wait queue that gets woken up less frequently.  This lets you see
APM effects.

(One thing I'm wondering about APM is if it's worth calling apm_do_busy
so early, or if we should wait until we've had a jiffy or two with no
idle time, meaning that we need more processor.  Lots of things do some
trivial processing periodically, but can live with a slowed processor.)

This registers as a dynamic misc device, so it's usually char 10:63,
but prints out what it's registered at during boot.

More information is available at http://www.nyx.net/~colin/
-- 
	-Colin

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu

\
 
 \ /
  Last update: 2005-03-22 12:43    [from the cache]
©2003-2008