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 01F5420222A for ; Mon, 7 May 2012 04:03:42 -0700 (PDT) Received: by bkty5 with SMTP id y5so8512514bkt.16 for ; Mon, 07 May 2012 04:03:40 -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=pi3Y+zzPmj1frWYG+kAs7gSe4S+Hkxy00J0nlyyloCs=; b=nGCBiIfCSolQlIKth8By4zjwRuXY0iBELkznKbsiCaMEix1skw4paOnzOLEPsh1mIS m9Jvnf7LzHw+OX4Xe6c0SzgTy5e+KTNeUrSb8lahuhR1RedrU3BPGD/C/lzC8Wpk5FBV iSxzwlPvR3AWfoSiobImOa07jxq6mcW4P6hfHy0fTh5EG0H9HCVk6s5SsUKkVGb4O7LX J+RuA4tL3qicriVxL0vSn6HQ0tIDpwC00VVqtvLK8Z/x+2SCvx6neKJN4X/AI7VC8dh/ auQsJ0TU+IH8PpZdVedqD0gL67Sy0ByBiPdCSnU+bcfFTt29GSTKvMo8NFHAkPE9byUs fiFA== Received: by 10.204.133.200 with SMTP id g8mr5222661bkt.110.1336388620223; Mon, 07 May 2012 04:03:40 -0700 (PDT) Received: from [172.30.42.18] (122.237.66.86.rev.sfr.net. [86.66.237.122]) by mx.google.com with ESMTPS id gm18sm31626187bkc.7.2012.05.07.04.03.38 (version=SSLv3 cipher=OTHER); Mon, 07 May 2012 04:03:39 -0700 (PDT) From: Eric Dumazet To: Dave =?ISO-8859-1?Q?T=E4ht?= In-Reply-To: <1336382204-24942-1-git-send-email-dave.taht@bufferbloat.net> References: <1336382204-24942-1-git-send-email-dave.taht@bufferbloat.net> Content-Type: text/plain; charset="UTF-8" Date: Mon, 07 May 2012 13:03:36 +0200 Message-ID: <1336388616.3752.2278.camel@edumazet-glaptop> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Content-Transfer-Encoding: 8bit Cc: codel@lists.bufferbloat.net Subject: Re: [Codel] [PATCH 2/2] codel: The missing fourth state 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: Mon, 07 May 2012 11:03:43 -0000 On Mon, 2012-05-07 at 02:16 -0700, Dave Täht wrote: > I'm not saying this is correct. But it would account for a quantum miss. > > As for good queue vs bad queue... don't know. > > In testing with 1 or 50 streams, at 100Mbit, it seems to do the job. > > I look forward to reading the actual paper. > --- > net/sched/sch_codel.c | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) > > diff --git a/net/sched/sch_codel.c b/net/sched/sch_codel.c > index a9e6383..55c75de 100644 > --- a/net/sched/sch_codel.c > +++ b/net/sched/sch_codel.c > @@ -195,9 +195,11 @@ static u32 count_rescale(struct codel_sched_data *q, codel_time_t now) { > default: > c = q->count - 1; > } > - c = max(1U, c); > - } > - return (u32) c; > + } else { > + c = q->count >> 4; > + } > + c = max(1U, c); > + return (u32) c; > } > > static struct sk_buff *codel_dequeue(struct Qdisc *sch) > @@ -247,7 +249,7 @@ static struct sk_buff *codel_dequeue(struct Qdisc *sch) > } > } else if (drop && > (codel_time_before(now - q->drop_next, > - 16 * q->interval) || > + 16 * q->interval) || > codel_time_after_eq(now - q->first_above_time, > 2 * q->interval))) { > codel_drop(sch, skb); I am refactoring the whole code to be able to include codel in other qdiscs. Splitting data into 3 separate structures (params, vars, stats) SFQ for example will share params,stats, but have separate 'vars' perf flow. by the way the last compare was wrong : it should be : if (codel_time_before(now - q->vars.drop_next, 16 * q->params.interval)) { u32 c = q->count - 1; } else { q->count = 1; }