From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Dumazet Subject: Re: [PATCH 2/2] udp: RCU handling for Unicast packets. Date: Thu, 30 Oct 2008 12:30:20 +0100 Message-ID: <49099ACC.3070600@cosmosbay.com> References: <49081D67.3050502@cosmosbay.com> <49082718.2030201@cosmosbay.com> <4908627C.6030001@acm.org> <490874F2.2060306@cosmosbay.com> <49088288.6050805@acm.org> <49088AD1.7040805@cosmosbay.com> <20081029163739.GB6732@linux.vnet.ibm.com> <49089BE5.3090705@acm.org> <4908A134.4040705@cosmosbay.com> <4908AB3F.1060003@acm.org> <20081029185200.GE6732@linux.vnet.ibm.com> <4908C0CD.5050406@cosmosbay.com> <1225364660.7803.61.camel@twins> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: paulmck@linux.vnet.ibm.com, Corey Minyard , David Miller , shemminger@vyatta.com, benny+usenet@amorsen.dk, netdev@vger.kernel.org, Christoph Lameter , johnpol@2ka.mipt.ru, Christian Bell To: Peter Zijlstra Return-path: Received: from gw1.cosmosbay.com ([86.65.150.130]:39902 "EHLO gw1.cosmosbay.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753729AbYJ3LbA convert rfc822-to-8bit (ORCPT ); Thu, 30 Oct 2008 07:31:00 -0400 In-Reply-To: <1225364660.7803.61.camel@twins> Sender: netdev-owner@vger.kernel.org List-ID: Peter Zijlstra a =E9crit : > On Wed, 2008-10-29 at 21:00 +0100, Eric Dumazet wrote: >=20 >> Hum... Another way of handling all those cases and avoid memory barr= iers >> would be to have different "NULL" pointers. >> >> Each hash chain should have a unique "NULL" pointer (in the case of = UDP, it >> can be the 128 values : [ (void*)0 .. (void *)127 ] >=20 > Why not use the bucket pointer as terminating condition? >=20 > Because all you really need is a pointer that is specific per bucket, > and not a valid element, right? Yes, but it forces compiler to keep around the bucket pointer. Big chance this value will be stored on stack. Next patch will use the least significant bit to distinguish a valid pointer from a "NULL pointer"