tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: mutex(9) on sparc64 RMO [was Re: pserialize(9) vs. TAILQ]



On Mon, 24 Nov 2014, Taylor R Campbell wrote:

>    Date: Mon, 24 Nov 2014 16:44:41 +0000 (UTC)
>    From: Eduardo Horvath <eeh%NetBSD.org@localhost>
> 
>    I enhanced membar_ops with proper memory barriers and then was looking at 
>    the mutex code.  Unfortunately, I didn't get very far.  It seemed at the 
>    time that the mutex code has two hooks for memory barriers after the 
>    atomic operations, however it's missing memory barrier hooks to ensure 
>    consistency before accessing the lock.
> 
> What exactly is the consistency you need before accessing the lock?

I know you need a `membar #Lookaside' before accessing the atomic 
variable.  I don't recall if other memory barriers are needed since it's 
been a while since I last looked at the V9 architecture reference.

Eduardo


Home | Main Index | Thread Index | Old Index