lkml.org 
[lkml]   [1999]   [Sep]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Clock Watching the Scheduler 2.2.10unip
On Mon, Sep 27, 1999 at 10:11:38PM -0400, Richard B. Johnson wrote:
> Erm.. How is this supposed to measure interrupts?

I think that what Robert is measuring is (excuse me while I say this
poorly) the time his process spends preempted.

[Robert's code]
Repeat 500 times:
> > for (i = 0; i < 500; i++ ) {

> > do {
> > } while ((t-c) < 90) ;
Wait until you get a "large" cycle count, large enough that the kernel
must have preempted the running process.

> > printf(" %lu\n",(t-c+32)&-64);
Round to the nearest 64 (?) cycles in a more or less opaque fashion.

I'm not sure what precisely is getting measured, but I'm sure it's a very
interesting number. :)

Jeff
--
\/ http://incolor.inetnebr.com/jepler/ Jeff Epler jepler@inetnebr.com
Shannon's Observation:
Nothing is so frustrating as a bad situation that is beginning to
improve.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:54    [from the cache]
©2003-2011 Jasper Spaans