Re: [PATCH] optimize writer path in time_interpolator_get_counter()

From: Alex Williamson
Date: Wed Aug 03 2005 - 11:34:26 EST


On Wed, 2005-08-03 at 09:10 -0700, Christoph Lameter wrote:
> On Wed, 3 Aug 2005, Alex Williamson wrote:
>
> > be a reasonable performance vs absolute accuracy trade-off. What
> > happens to your worst case time if you (just for a test) hard code a
> > min_delta of something around 20-50? There could be some kind of
>
> Think about a threaded process that gets time on multiple processors
> and then compares the times. This means that the time value obtained later
> on one thread may indicate a time earlier than that obtained on another
> thread. An essential requirement for time values is that they are
> monotonically increasing. You are changing that basic nature.

Ok, I can see the scenario where that could produce jitter. However,
that implies than any exit through that path could produce jitter as it
is. For instance:

CPU0 CPU1
read lcycle
read itc
read lcycle
read itc
cmpxchg
oops, lcycle is stale

So the window already exists for this...

Alex

--
Alex Williamson HP Linux & Open Source Lab

-
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/