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 7DD4E200BFD for ; Sat, 12 May 2012 13:47:18 -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 q4CKjD8t000810 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NO); Sat, 12 May 2012 13:45:14 -0700 Date: Sat, 12 May 2012 16:45:13 -0400 (EDT) Message-Id: <20120512.164513.1156706853054390966.davem@davemloft.net> To: eric.dumazet@gmail.com From: David Miller In-Reply-To: <1336855256.31653.1329.camel@edumazet-glaptop> References: <1336829533.31653.1108.camel@edumazet-glaptop> <20120512.155259.1178343836887150194.davem@davemloft.net> <1336855256.31653.1329.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 13:45:15 -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 20:47:18 -0000 From: Eric Dumazet Date: Sat, 12 May 2012 22:40:56 +0200 > 24 bit of precision for the reciprocal value is more than enough (Van > suggested 16 bits in fact), so we have actually room for 7 bits if > needed. Using a u16 would also work for me. > 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?