Re: RFC: patch to allow lock-free traversal of lists with insertion

Manfred Spraul
2001-10-09T16:50:45Z

>
> On Tue, Oct 09, 2001 at 07:03:37PM +1000, Rusty Russell wrote:
> > I don't *like* making Alpha's wmb() stronger, but it is the
> > only solution which doesn't touch common code.
>
> It's not a "solution" at all. It's so heavy weight you'd be
> much better off with locks. Just use the damned rmb_me_harder.

rmb_me_harder? smp_mb__{before,after}_{atomic_dec,clear_bit} are already ugly enough.

What about hiding all these details in the list access macros? list_insert, list_get_next, etc. With a default implementation based
on a spinlock, and the capable SMP architectures could define an optimized version.

Then Alpha could do whatever flushing is required. But please do not scatter memory barrier instructions all around the kernel.

--
Manfred