Re: [PATCH] arp_queue: serializing unlink + kfree_skb

Herbert Xu
2005-02-10T04:58:15Z

On Thu, Feb 10, 2005 at 01:23:04AM -0300, Werner Almesberger wrote:
>
> What happens if the operation could return a value, but the user
> ignores it ? E.g. if I don't like smp_mb__*, could I just use
>
> atomic_inc_and_test(foo);
>
> instead of
>
> smp_mb__before_atomic_inc();
> atomic_inc(foo);
> smp_mb__after_atomic_dec();

Yes you can.

> ? If yes, is this a good idea ?

Dave mentioned that on sparc64, atomic_inc_and_test is much more
expensive than the second variant.

Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt