netdev
[Top] [All Lists]

Re: atomic_dec_and_test for child dst needed in dst_destroy?

To: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Subject: Re: atomic_dec_and_test for child dst needed in dst_destroy?
From: "David S. Miller" <davem@xxxxxxxxxxxxx>
Date: Wed, 6 Apr 2005 11:17:21 -0700
Cc: christoph@xxxxxxxxxxx, herbert@xxxxxxxxxxxxxxxxxxx, netdev@xxxxxxxxxxx
In-reply-to: <E1DJ5y2-0003rF-00@xxxxxxxxxxxxxxxxxxxxxxxx>
References: <Pine.LNX.4.58.0504051925250.21486@xxxxxxxxxx> <E1DJ5y2-0003rF-00@xxxxxxxxxxxxxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
On Wed, 06 Apr 2005 18:32:54 +1000
Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> wrote:

> In fact, the atomic_dec_and_test is really only needed for unhashed
> entries (i.e., IPsec).  So we could do something like this so that
> all hashed entries undergo atomic_dec.
> 
> This would only make sense if there were architectures where
> atomic_dec is significantly cheaper compared to atomic_dec_and_test.
> 
> Do such beasts exist?

See his other emails in this thread.  If it can be converted to
atomic_dec() then he wants to change the counter into an array
of counters on NUMA systems.

But his trick only works if the atomic_dec_and_test() can be eliminated
for all cases, which we're now quite certain is not possible.


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