Received: with ECARTIS (v1.0.0; list netdev); Thu, 03 Feb 2005 10:21:45 -0800 (PST) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id j13ILdYe004754 for ; Thu, 3 Feb 2005 10:21:40 -0800 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 1CwlUj-0007BL-00; Thu, 03 Feb 2005 10:14:21 -0800 Date: Thu, 3 Feb 2005 10:14:20 -0800 From: "David S. Miller" To: Anton Blanchard Cc: herbert@gondor.apana.org.au, okir@suse.de, netdev@oss.sgi.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] arp_queue: serializing unlink + kfree_skb Message-Id: <20050203101420.468c1607.davem@davemloft.net> In-Reply-To: <20050203142705.GA11318@krispykreme.ozlabs.ibm.com> References: <20050131102920.GC4170@suse.de> <20050203142705.GA11318@krispykreme.ozlabs.ibm.com> X-Mailer: Sylpheed version 1.0.0 (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 version 0.81, clamav-milter version 0.81b on oss.sgi.com X-Virus-Status: Clean X-archive-position: 1226 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 On Fri, 4 Feb 2005 01:27:05 +1100 Anton Blanchard 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.