lkml.org 
[lkml]   [1999]   [Nov]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: spin_unlock optimization(i386)

On Thu, 25 Nov 1999, Linus Torvalds wrote:

> > We definitively need the memory barrier during set_current_state():
>
> Yes. I think that oxymorons explanation is the correct one: we do need the
> serialization for "lock" operations, and we do need it to protect other
> data.
>
> The reason unlock can be done without serialization is just due to intel
> breaking symmetry on re-ordering reads and writes: if you allow reads to
> only pass "upwards", then that in itself is sufficient explanation for why
> the simple unlock works.

hm. At least my reading of Erich's emails is that no kind of read can ever
see out of order (noncausal) memory contents. It can execute out of order,
but if any conflict arises (the affected fill buffer / cacheline sees a
change event from some other CPU), then the speculative read is thrown
away.

Ingo


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:55    [W:0.067 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site