[parisc-linux] Anyone got a few moments?

Alan Cox alan@lxorguk.ukuu.org.uk
Mon, 28 Jun 1999 19:37:05 +0100 (BST)


> > Yes.  Major pain since the only useful atomic operations are load & clear
> > word/double as you noted.
> 
> and that's it.  That's only 31 uses where xchg couldn't be replaced
> with get_and_zero.  I suspect most of these are using this mechanism to
> walk a list without using a spinlock.  The slab uses are debug code only
> (so they aren't performance critical by any means).  I bet most of these
> uses could be removed without _too_ many problems.  I wonder what Linus'
> opinion is on this.

The sparc only has swap byte with 0xFF. They also have to use a small spinlock
for doing 32/64bit xchg ops. Thats ok. Xchg is only hopefully fast - since
on most machines xchg is a bus locker or pushes to ram the difference will
be minimal. 

The Alpha/Mips probably have it the nicest with the load locked/conditional
store.