From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-bk0-f43.google.com (mail-bk0-f43.google.com [209.85.214.43]) (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 D18CC200B29 for ; Fri, 4 May 2012 10:47:37 -0700 (PDT) Received: by bkty5 with SMTP id y5so5498413bkt.16 for ; Fri, 04 May 2012 10:47:35 -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=r77ADWWKOph32sw/fkAakoNO+qTVJ/yN625Li8FMSBs=; b=WAkWx1pNdQD1RkDwR7Kl/E9IFocc81UmHtMXl2qnHpIRetgrMqo/5vDQfuZJsMXf6m 3RThI0UVRvbumaHhIocZM8BIGTnDmUiuAxSvn3kSmWrZB5gYc2gYl04yUVwpKfoeo5RM mWjefPCksEvQkilqk5+8tKsBAWIx6gxSIJ7CjwUvTRwDPhR5CxA5BVOa4q2/SaZXH5Fd inTC60nEvRkrNlP6lnjxn3ODBTXadS2hQJxPL1xFM5DL2NyqqpiitSPltwgg131eFQWv SfZJqkUIN1m+Yl/+/rc/ic8fbloILHXIE9iVwBHelpZ6as7lpal0Il74hQsEm7YqEpV7 cWKA== Received: by 10.204.129.89 with SMTP id n25mr2561092bks.83.1336153655863; Fri, 04 May 2012 10:47:35 -0700 (PDT) Received: from [172.28.131.195] ([74.125.122.49]) by mx.google.com with ESMTPS id z14sm18257850bky.15.2012.05.04.10.47.34 (version=SSLv3 cipher=OTHER); Fri, 04 May 2012 10:47:35 -0700 (PDT) From: Eric Dumazet To: Dave Taht In-Reply-To: References: <4FA3F248.3070101@freedesktop.org> <4FA3F50D.7080406@freedesktop.org> <1336146993.3752.354.camel@edumazet-glaptop> Content-Type: text/plain; charset="UTF-8" Date: Fri, 04 May 2012 19:47:32 +0200 Message-ID: <1336153652.3752.361.camel@edumazet-glaptop> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Content-Transfer-Encoding: 7bit Cc: codel@lists.bufferbloat.net Subject: Re: [Codel] fp sqrt vis int sqrt? 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: Fri, 04 May 2012 17:47:38 -0000 On Fri, 2012-05-04 at 10:23 -0700, Dave Taht wrote: > In looking over the (lack of) compiler support for fp in the kernel, > it seems simplest to load up a table from userspace for the > interval/sqrt(count) calculation. Well, you could have a small table (not from userspace, thats really not needed at all) for the 16 first sqrt values. More over, for the first sqrt values you can use reciprocal divide so that we dont have a divide anymore (see include/linux/reciprocal_div.h), and you can have a very precise sqrt this way, not an integral one. With count >= 16, the error you mention becomes small.