lkml.org 
[lkml]   [2008]   [Nov]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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


\
 
 \ /
  Last update: 2008-11-08 20:07    [W:0.088 / U:0.644 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site