Re: [PATCH] arp_queue: serializing unlink + kfree_skb

David S. Miller
2005-02-03T18:25:42Z

On Fri, 4 Feb 2005 01:27:05 +1100
Anton Blanchard <anton@samba.org> wrote:

> Architectures should guarantee that any of the atomics and bitops that
> return values order in both directions. So you dont need the
> smp_mb__before_atomic_dec here.
>
> It is, however, required on the atomics and bitops that dont return
> values. Its difficult stuff, everyone gets it wrong and Andrew keeps
> hassling me to write up a document explaining it.

Sparc64 happens to order the atomic we use in the bitops and atomic_t
ops, so sparc64 gets this right by accident.

I had no idea about this requirement before reading your email.

If IBM is seeing race this on ppc64, then I'm even more confused.
If Anton understands the requirements, then ppc64 should have
the return value atomic's implemented with the proper barriers.