Received: with ECARTIS (v1.0.0; list netdev); Wed, 06 Apr 2005 11:19:47 -0700 (PDT) Received: from cheetah.davemloft.net (mail@dsl027-180-174.sfo1.dsl.speakeasy.net [216.27.180.174]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id j36IJcCP011642 for ; Wed, 6 Apr 2005 11:19:39 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1DJF5d-0004XP-00; Wed, 06 Apr 2005 11:17:21 -0700 Date: Wed, 6 Apr 2005 11:17:21 -0700 From: "David S. Miller" To: Herbert Xu Cc: christoph@lameter.com, herbert@gondor.apana.org.au, netdev@oss.sgi.com Subject: Re: atomic_dec_and_test for child dst needed in dst_destroy? Message-Id: <20050406111721.3ac67605.davem@davemloft.net> In-Reply-To: References: X-Mailer: Sylpheed version 1.0.4 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.83/809/Tue Apr 5 11:22:26 2005 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 1493 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 721 Lines: 19 On Wed, 06 Apr 2005 18:32:54 +1000 Herbert Xu 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.