lkml.org 
[lkml]   [1998]   [Jun]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
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 13:43    [W:0.024 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site