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/