From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by huchra.bufferbloat.net (Postfix, from userid 1000) id E379320222A; Mon, 7 May 2012 02:16:45 -0700 (PDT) From: =?UTF-8?q?Dave=20T=C3=A4ht?= To: codel@lists.bufferbloat.net Date: Mon, 7 May 2012 02:16:44 -0700 Message-Id: <1336382204-24942-1-git-send-email-dave.taht@bufferbloat.net> X-Mailer: git-send-email 1.7.1 Cc: =?UTF-8?q?Dave=20T=C3=A4ht?= Subject: [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 09:16:46 -0000 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); -- 1.7.9.5