Re: [git pull] scheduler updates

From: Ingo Molnar
Date: Sat Nov 08 2008 - 14:05:36 EST



* Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:

> Doing it in get_cycles() and "forgetting about it" may sound like a
> simple solution, but it's likely wrong. For example, one of the few
> cases where we realy care about time going backwards is
> gettimeofday() - which uses tsc, but which also has tons of
> serializing instructions on its own. EXCEPT WHEN IT IS a vsyscall!
>
> But in that case, we don't even have the barrier, because we put it
> in the wrong function and 'forgot about it'. Of course, we may not
> need it (rdtscp maybe always serializes, I didn't check), but the
> point is, an explicit barrier is actually better than one that is
> hidden.

no, we really had it in the vsyscall case: which uses vread, which
uses __native_read_tsc(), which had the barriers.

And i think that's the _only_ valid place to have it.

So that's why my change moves it from the __native_read_tsc() over to
_only_ the vget_cycles().

am i missing something on such a nice Saturday evening? :)

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