* [Codel] [PATCH 2/2] codel: The missing fourth state
@ 2012-05-07 9:16 Dave Täht
2012-05-07 9:30 ` dave taht
2012-05-07 11:03 ` Eric Dumazet
0 siblings, 2 replies; 3+ messages in thread
From: Dave Täht @ 2012-05-07 9:16 UTC (permalink / raw)
To: codel; +Cc: Dave Täht
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Codel] [PATCH 2/2] codel: The missing fourth state
2012-05-07 9:16 [Codel] [PATCH 2/2] codel: The missing fourth state Dave Täht
@ 2012-05-07 9:30 ` dave taht
2012-05-07 11:03 ` Eric Dumazet
1 sibling, 0 replies; 3+ messages in thread
From: dave taht @ 2012-05-07 9:30 UTC (permalink / raw)
To: codel
but in testing 100, delays go to 30ms, and count collapses too quick...
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Codel] [PATCH 2/2] codel: The missing fourth state
2012-05-07 9:16 [Codel] [PATCH 2/2] codel: The missing fourth state Dave Täht
2012-05-07 9:30 ` dave taht
@ 2012-05-07 11:03 ` Eric Dumazet
1 sibling, 0 replies; 3+ messages in thread
From: Eric Dumazet @ 2012-05-07 11:03 UTC (permalink / raw)
To: Dave Täht; +Cc: codel
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;
}
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-05-07 11:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-07 9:16 [Codel] [PATCH 2/2] codel: The missing fourth state Dave Täht
2012-05-07 9:30 ` dave taht
2012-05-07 11:03 ` Eric Dumazet
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox