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

Re: Lazy page reclamation on SMP machines: memory barriers





On Tue, 24 Mar 1998, Stephen C. Tweedie wrote:
> > Intel guarantees total ordering around any locked instruction, so the
> > spinlocks themselves act as the barriers. 
> 
> Fine.  Can we assume that spinlocks and atomic set/clear_bit
> instructions have the same semantics on other CPUs?

We can certainly guarantee that a spinlock has the necessary locking
semantics - anything else would make spinlocks useless. 

The other atomic instructions I'd be inclined to claim to be weakly
ordered.

		Linus