Re: I.5 - Mmaped count
From: Paul Mackerras
Date: Mon Jun 22 2009 - 20:33:43 EST
stephane eranian writes:
> Unless you tell me that pc->index is marked invalid (0) when the
> event is not scheduled. I don't see how you can avoid reading
> the wrong value. I am assuming that is the event is not scheduled
> lock remains constant.
That's what happens; when pc->index == 0, the event is not scheduled
and the current count is in pc->offset.
> Assuming the event is active when you enter the loop and you
> read a value. How to get the timing information to scale the
> count?
At present you'd have to do a read(). It wouldn't be hard to add
fields to mmapped page to enable the user program to compute
up-to-date timing information from the TSC (x86) or timebase (powerpc)
value. We'll do that.
Paul.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/