[Top] [All Lists]

Re: [PATCH] arp_queue: serializing unlink + kfree_skb

To: Werner Almesberger <wa@xxxxxxxxxxxxxxx>
Subject: Re: [PATCH] arp_queue: serializing unlink + kfree_skb
From: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 10 Feb 2005 15:56:47 +1100
Cc: "David S. Miller" <davem@xxxxxxxxxxxxx>, anton@xxxxxxxxx, okir@xxxxxxx, netdev@xxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
In-reply-to: <20050210012304.E25338@xxxxxxxxxxxxxxx>
References: <20050131102920.GC4170@xxxxxxx> <E1CvZo6-0001Bz-00@xxxxxxxxxxxxxxxxxxxxxxxx> <20050203142705.GA11318@xxxxxxxxxxxxxxxxxxxxxxxxxx> <20050203150821.2321130b.davem@xxxxxxxxxxxxx> <20050204113305.GA12764@xxxxxxxxxxxxxxxxxxx> <20050204154855.79340cdb.davem@xxxxxxxxxxxxx> <20050204222428.1a13a482.davem@xxxxxxxxxxxxx> <20050210012304.E25338@xxxxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mutt/1.5.6+20040722i
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.

Visit Openswan at
Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page:
PGP Key:

<Prev in Thread] Current Thread [Next in Thread>