diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2012-01-01 13:33:31 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-01-03 12:52:09 -0500 |
commit | d47a0ac7b66883987275598d6039f902f4410ca9 (patch) | |
tree | d70709d26a3833e2747126d221bbb2aa3f28ebd7 /net/sched/sch_sfq.c | |
parent | 1c015b3b82c92fad375ce7dfff54799cfdfb7a15 (diff) |
sch_sfq: dont put new flow at the end of flows
SFQ enqueue algo puts a new flow _behind_ all pre-existing flows in the
circular list. In fact this is probably an old SFQ implementation bug.
100 Mbits = ~8333 full frames per second, or ~8 frames per ms.
With 50 flows, it means your "new flow" will have to wait 50 packets
being sent before its own packet. Thats the ~6ms.
We certainly can change SFQ to give a priority advantage to new flows,
so that next dequeued packet is taken from a new flow, not an old one.
Reported-by: Dave Taht <dave.taht@gmail.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/sch_sfq.c')
-rw-r--r-- | net/sched/sch_sfq.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sched/sch_sfq.c b/net/sched/sch_sfq.c index d329a8a72357..e9d5c911576d 100644 --- a/net/sched/sch_sfq.c +++ b/net/sched/sch_sfq.c | |||
@@ -366,11 +366,11 @@ sfq_enqueue(struct sk_buff *skb, struct Qdisc *sch) | |||
366 | if (slot->qlen == 1) { /* The flow is new */ | 366 | if (slot->qlen == 1) { /* The flow is new */ |
367 | if (q->tail == NULL) { /* It is the first flow */ | 367 | if (q->tail == NULL) { /* It is the first flow */ |
368 | slot->next = x; | 368 | slot->next = x; |
369 | q->tail = slot; | ||
369 | } else { | 370 | } else { |
370 | slot->next = q->tail->next; | 371 | slot->next = q->tail->next; |
371 | q->tail->next = x; | 372 | q->tail->next = x; |
372 | } | 373 | } |
373 | q->tail = slot; | ||
374 | slot->allot = q->scaled_quantum; | 374 | slot->allot = q->scaled_quantum; |
375 | } | 375 | } |
376 | if (++sch->q.qlen <= q->limit) | 376 | if (++sch->q.qlen <= q->limit) |