lkml.org 
[lkml]   [2009]   [Nov]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch][rfc] x86, mutex: non-atomic unlock (and a rant)
[Cyrill Gorcunov - Mon, Nov 02, 2009 at 07:46:26PM +0300]
|
| The other option could be that we put two mem-write operations
| like
| int tmp;
| atomic_set(&lock->count, 1);
| tmp = lock->waiters;
| rmb();
| lock->waiters = tmp;
| if (unlikely(lock->waiters))
| fail_fn(lock);
|
| Which should work faster then cpuid (and we have to be sure somehow
| that gcc doesn't suppress this redundant operations).
|

And which has nothing to do with OoO mem-read, and wouldn't
work. Sorry for noise.

-- Cyrill


\
 
 \ /
  Last update: 2009-11-02 19:13    [W:0.035 / U:23.728 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site