From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from shards.monkeyblade.net (shards.monkeyblade.net [198.137.202.13]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by huchra.bufferbloat.net (Postfix) with ESMTPS id 450BB200BFD for ; Sat, 12 May 2012 14:54:22 -0700 (PDT) Received: from localhost (cpe-66-108-118-54.nyc.res.rr.com [66.108.118.54]) (authenticated bits=0) by shards.monkeyblade.net (8.14.4/8.14.4) with ESMTP id q4CLqHH5003402 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NO); Sat, 12 May 2012 14:52:18 -0700 Date: Sat, 12 May 2012 17:52:17 -0400 (EDT) Message-Id: <20120512.175217.1632102067268101115.davem@davemloft.net> To: eric.dumazet@gmail.com From: David Miller In-Reply-To: <1336859324.31653.1385.camel@edumazet-glaptop> References: <1336855256.31653.1329.camel@edumazet-glaptop> <20120512.164513.1156706853054390966.davem@davemloft.net> <1336859324.31653.1385.camel@edumazet-glaptop> X-Mailer: Mew version 6.5 on Emacs 24.0.95 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (shards.monkeyblade.net [198.137.202.13]); Sat, 12 May 2012 14:52:19 -0700 (PDT) Cc: dave.taht@bufferbloat.net, nanditad@google.com, netdev@vger.kernel.org, codel@lists.bufferbloat.net, ycheng@google.com, shemminger@vyatta.com, mattmathis@google.com Subject: Re: [Codel] [PATCH net-next] codel: use Newton method instead of sqrt() and divides X-BeenThere: codel@lists.bufferbloat.net X-Mailman-Version: 2.1.13 Precedence: list List-Id: CoDel AQM discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 May 2012 21:54:22 -0000 From: Eric Dumazet Date: Sat, 12 May 2012 23:48:44 +0200 > On Sat, 2012-05-12 at 16:45 -0400, David Miller wrote: >> Using a u16 would also work for me. > > I tried it but it gives noticeable errors for count > 16000, and no > speed gain. ... > And if a flow is really agressive, count can grow above 10^6 > >> > By the way, gcc on x86 generates nice "and 0xfffffffe,%eax" instruction >> > for (vars->rec_inv_sqrt << 1). >> >> Yeah but what do stores of ->rec_inv_sqrt look like? > > The load is "shr %edi" as in : > and the store an "or %ecx,%esi" Ok, fair enough.