From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f41.google.com (mail-wg0-f41.google.com [74.125.82.41]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority" (verified OK)) by huchra.bufferbloat.net (Postfix) with ESMTPS id 3475021F09F for ; Sat, 5 May 2012 04:40:16 -0700 (PDT) Received: by wgbds1 with SMTP id ds1so1926985wgb.4 for ; Sat, 05 May 2012 04:40:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=dL0IUd/x7kemG/rMZ9U3VT/UAjPpMHGShTXxhzJPOZQ=; b=ZB1oRRHTr4DxFPSGkh9YfZ+s6myK2myCy7/CXTogeSgO+HaPWRXoJkCipJeVriFR3h NWYD+oOwVulNcTTcZj7MuxzUpMorqMTdQBNiW9ILtdpfDfvT4zMPlXJjGs6ckkmr9vS9 JdNRnIN/I5MfyuHJ9VYtcOo+QYtDafvmMBuPnErpUs6S6LAFq12b6J7FrN6CifMQku5H mMgrivSS9ntfwFwNmTJxU+I9a/nCTO9didtBkdWNR4AbqqXtkHxh+Fe55Q5Zj+QlWF6b PcbcocVZFFzxoqo1xebSJjJnHxDJyPSdL1mbjYcWma1uOEXxA6FnvDf8pbPa7T0+VPyB pNKQ== MIME-Version: 1.0 Received: by 10.180.97.228 with SMTP id ed4mr24198637wib.0.1336218013959; Sat, 05 May 2012 04:40:13 -0700 (PDT) Received: by 10.223.112.66 with HTTP; Sat, 5 May 2012 04:40:13 -0700 (PDT) In-Reply-To: <1336217671-20384-1-git-send-email-dave.taht@bufferbloat.net> References: <1336217671-20384-1-git-send-email-dave.taht@bufferbloat.net> Date: Sat, 5 May 2012 04:40:13 -0700 Message-ID: From: Dave Taht To: =?ISO-8859-1?Q?Dave_T=E4ht?= Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: codel@lists.bufferbloat.net Subject: Re: [Codel] [PATCH 2/2] Clamp interval to 32 bits 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, 05 May 2012 11:40:16 -0000 On Sat, May 5, 2012 at 4:34 AM, Dave T=E4ht wro= te: > --- > =A0net/sched/sch_codel.c | =A0 =A06 +++--- > =A01 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/net/sched/sch_codel.c b/net/sched/sch_codel.c > index 636f505..d26db8c 100644 > --- a/net/sched/sch_codel.c > +++ b/net/sched/sch_codel.c > @@ -88,10 +88,10 @@ static unsigned int states; > =A0* return interval/sqrt(x) with good precision > =A0*/ > > -static u32 calc(u64 interval, unsigned long x) > +static u32 calc(u32 _interval, unsigned long x) > =A0{ > - =A0 =A0 =A0 /* scale for 16 bits precision */ > - =A0 =A0 =A0 while (x < (1UL << 30)) { > + =A0 =A0 =A0 u64 interval =3D _interval; > + =A0 =A0 =A0 while (x < (1UL << (BITS_PER_LONG - 2))) { > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0x <<=3D 2; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0interval <<=3D 1; > =A0 =A0 =A0 =A0} > -- > 1.7.9.5 > eric correctly pointed out that I'm crazy. If I run either version of this with htb, it crashes after a brief load. qdisc del dev eth0 root qdisc add dev eth0 root handle 1: est 1sec 8sec htb default 1 class add dev eth0 parent 1: classid 1:1 est 1sec 8sec htb rate 2000kibit mtu 1500 quantum 1514 qdisc add dev eth0 parent 1:1 handle 10: est 1sec 4sec codel target 5ms interval 100ms limit 1000 I figure that's due to my still-botched netlink interface to the change rou= tine. I read some relevant code and the netlink doc and it's becoming more clear but I'm going to bed. handing off now. --=20 Dave T=E4ht SKYPE: davetaht US Tel: 1-239-829-5608 http://www.bufferbloat.net