Re: Dual core Athlons and unsynced TSCs
From: thockin
Date: Sun Jan 15 2006 - 13:36:24 EST
On Sun, Jan 15, 2006 at 01:29:36PM -0500, Lee Revell wrote:
> > Or both. You can trap rdtsc users in userland, you have to manually audit
> > kernel users.
> >
> > It should be abolished or properly wrapped in kernel code, as soon as a
> > resync path is available.
>
> For the purposes of this discussion I was not considering direct use of
> rdtsc from userland for timing, I've accepted the arguments that this is
> a lost cause with today's hardware (although I maintain it was viable in
> practice on previous generations of hardware). Besides, rdtsc is
> useless from userspace if the kernel traps it, because the whole point
> of using it over gettimeofday() was that it was dirt cheap.
>
> I'm content to make sure the kernel's internal timekeeping is solid.
You only need to trap rdtsc if you know that some unsyncronizing event has
happened. E.g. 'hlt' or some other sleep state. If we sync every time we
hlt, then we don't need to trap. But we can maybe be lazier about it.
The sync operation itself may not be cheap, and it may be useful to skip
it if possible.
-
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/