From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com [209.85.212.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority" (verified OK)) by huchra.bufferbloat.net (Postfix) with ESMTPS id BBD5C200BFD for ; Sat, 12 May 2012 13:41:05 -0700 (PDT) Received: by wibhn14 with SMTP id hn14so2470539wib.10 for ; Sat, 12 May 2012 13:41:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:from:to:cc:in-reply-to:references:content-type:date :message-id:mime-version:x-mailer:content-transfer-encoding; bh=ruADPI+XWjg0FSZ3+QXYWYPiNNdU9H1ReZD0cQvrQxA=; b=q0ovioVEwgB/9mh8k2AzqR8J8/y1R0DDrrO3icGTAm9ziRbAE9ZfA+vmf3WLtBfziO NuXqcsnxwS1bbQIeaq+jmPGOwG3Rjl3NshGdlGK6OiE9t0EKKp32zB6/9Dd3uprObrXK GcPUZwt1fKVhyImcY/BrGlCxftqteVwzIBmD6qv9tcHvb7Ao72h78MLjMsqelTzdVcLU YZpfntB4bN3psmSL+lAKsiUlORHqA+faxNxiZZYhahe2XL0cRQfbQneSbatm+Wke8CAq lTCa/4EgFCuTd5s8pHYdRWaj+hMBfFbUavvlJCo7yq0hGtSwgY78hpKlT6rzzBHo5Xff lzKA== Received: by 10.180.84.4 with SMTP id u4mr6663976wiy.2.1336855263440; Sat, 12 May 2012 13:41:03 -0700 (PDT) Received: from [172.28.131.74] ([74.125.122.49]) by mx.google.com with ESMTPS id h8sm34113769wix.4.2012.05.12.13.40.58 (version=SSLv3 cipher=OTHER); Sat, 12 May 2012 13:41:01 -0700 (PDT) From: Eric Dumazet To: David Miller In-Reply-To: <20120512.155259.1178343836887150194.davem@davemloft.net> References: <1336829533.31653.1108.camel@edumazet-glaptop> <20120512.155259.1178343836887150194.davem@davemloft.net> Content-Type: text/plain; charset="UTF-8" Date: Sat, 12 May 2012 22:40:56 +0200 Message-ID: <1336855256.31653.1329.camel@edumazet-glaptop> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Content-Transfer-Encoding: 7bit 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:41:06 -0000 On Sat, 2012-05-12 at 15:52 -0400, David Miller wrote: > Applied but I never like that bitfield sharing for real integers. > > GCC makes a complete mess of it as it extracts and inserts the > integer value into that bit field. You are guarenteed to get > better code if you do this by hand in a full u32. > > Either that or just bite the bullet and use a completely seperate > field, maybe we'll need more boolean states later. I couldnt use a full u32 or else fq_codel cell was > 64 bytes (or I would have to remove the 'dropped' field) 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. By the way, gcc on x86 generates nice "and 0xfffffffe,%eax" instruction for (vars->rec_inv_sqrt << 1). Thanks