Re: how to measure scheduler latency on powerpc? realfeel doesn't work due to /dev/rtc issues

paubert (paubert@iram.es)
Fri, 9 May 2003 11:37:29 +0000


On Fri, May 09, 2003 at 02:14:13AM -0400, Chris Friesen wrote:
> William Lee Irwin III wrote:
>
> >Try the timebase instead.
>
> The timestamp is not hard to get. The problem is getting a medium-frequency
>
> (2KHz or so) hardware interrupt to drive the test.

Reload the decrementer with a smaller value, and read the decrementer value
at the beginning of every timer_interrupt. Timekeeping only depends on the
timebase on PPC (I wrote most of the code), taking additional decrementer
interrupts does not harm. Actually the simplest and most efficient way
to perform a self IPI on PPC is to write 0 to the decrementer (2 machine
instructions).

Actually, a way to measure the longest time during which interrupts are masked
would be:

- when disabling interrupts, set decrementer to zero if they
were previously enabled.
- read the decrementer on every timer/external interrupt,
if the value is negative and too large print the value
and the point at which the interrupts were reenabled.

That's not perfect (it will generate not too many false positives but
quite some overhead, but it should work).

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