diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2012-03-13 14:04:25 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-03-16 04:55:25 -0400 |
commit | cc34eb672eedb5ff248ac3bf9971a76f141fd141 (patch) | |
tree | c3bb99022ba73eb31440f5774e4c9e635be6721d /net/sched/sch_sfq.c | |
parent | 122bdf67f15a22bcabf6c2cab3a545d17ccf68dc (diff) |
sch_sfq: revert dont put new flow at the end of flows
This reverts commit d47a0ac7b6 (sch_sfq: dont put new flow at the end of
flows)
As Jesper found out, patch sounded great but has bad side effects.
In stress situation, pushing new flows in front of the queue can prevent
old flows doing any progress. Packets can stay in SFQ queue for
unlimited amount of time.
It's possible to add heuristics to limit this problem, but this would
add complexity outside of SFQ scope.
A more sensible answer to Dave Taht concerns (who reported the issued I
tried to solve in original commit) is probably to use a qdisc hierarchy
so that high prio packets dont enter a potentially crowded SFQ qdisc.
Reported-by: Jesper Dangaard Brouer <jdb@comx.dk>
Cc: 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 | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/net/sched/sch_sfq.c b/net/sched/sch_sfq.c index 60d47180f043..02a21abea65e 100644 --- a/net/sched/sch_sfq.c +++ b/net/sched/sch_sfq.c | |||
@@ -469,11 +469,15 @@ enqueue: | |||
469 | if (slot->qlen == 1) { /* The flow is new */ | 469 | if (slot->qlen == 1) { /* The flow is new */ |
470 | if (q->tail == NULL) { /* It is the first flow */ | 470 | if (q->tail == NULL) { /* It is the first flow */ |
471 | slot->next = x; | 471 | slot->next = x; |
472 | q->tail = slot; | ||
473 | } else { | 472 | } else { |
474 | slot->next = q->tail->next; | 473 | slot->next = q->tail->next; |
475 | q->tail->next = x; | 474 | q->tail->next = x; |
476 | } | 475 | } |
476 | /* We put this flow at the end of our flow list. | ||
477 | * This might sound unfair for a new flow to wait after old ones, | ||
478 | * but we could endup servicing new flows only, and freeze old ones. | ||
479 | */ | ||
480 | q->tail = slot; | ||
477 | /* We could use a bigger initial quantum for new flows */ | 481 | /* We could use a bigger initial quantum for new flows */ |
478 | slot->allot = q->scaled_quantum; | 482 | slot->allot = q->scaled_quantum; |
479 | } | 483 | } |