[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Re: [PATCH] PPC lll_mutex_unlock_force write barrier



Steve Munroe <sjmunroe us ibm com> schrieb am 28.08.03 00:01:46:
> 
> Alexander Terekhov writes:
> 
> > Sort of. First off, unless I'm just missing and/or misunderstanding
> > something, you've put it in the wrong place. Also, a write barrier 
> > isn't enough here. mutex.unlock also needs a read barrier.
> 
> Actually I was refering to lll_mutex_unlock_force which stuffs a 0 into 
> the lock word then calls lll_futex_wake. This is different from 
> lll_mutex_unlock, which uses atomic_exchange_rel,  which includes all the 
> required synchronization.

You'll need an equivalent of Itanic's "st.rel" to stuff a 0 into the 
lock word. In SPARC-RMO "speach", that would be

   membar #StoreStore 
   membar #LoadStore  
   st %g0,[lock] 

not

   st %g0,[lock] 
   membar #StoreStore 
   membar #LoadStore  
   ...

For PPC, you'll need to place the msync barrier (with the semantics 
as close as possible to "sink-store + sink-load" -- aka "release") 
BEFORE stuffing 0 into a lock word. Oder?

regards,
alexander.

__________________________________________________________________________
Die sicherste Form der Kommunikation: E-Mails verschluesseln, Spam-Filter,
Adressverifizierung, digitale Unterschrift: http://freemail.web.de




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]