Messages in this thread | | | Date | Sat, 8 Nov 2008 20:05:17 +0100 | From | Ingo Molnar <> | Subject | Re: [git pull] scheduler updates |
| |
* Linus Torvalds <torvalds@linux-foundation.org> 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
| |