diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2011-02-23 05:56:17 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-02-23 17:05:11 -0500 |
commit | e13e02a3c68d899169c78d9a18689bd73491d59a (patch) | |
tree | 6e6b40ef37261df391cd445ec0f1b3d538b23a47 /net/sched/Kconfig | |
parent | dee9f4bceb5fd9dbfcc1567148fccdbf16d6a38a (diff) |
net_sched: SFB flow scheduler
This is the Stochastic Fair Blue scheduler, based on work from :
W. Feng, D. Kandlur, D. Saha, K. Shin. Blue: A New Class of Active Queue
Management Algorithms. U. Michigan CSE-TR-387-99, April 1999.
http://www.thefengs.com/wuchang/blue/CSE-TR-387-99.pdf
This implementation is based on work done by Juliusz Chroboczek
General SFB algorithm can be found in figure 14, page 15:
B[l][n] : L x N array of bins (L levels, N bins per level)
enqueue()
Calculate hash function values h{0}, h{1}, .. h{L-1}
Update bins at each level
for i = 0 to L - 1
if (B[i][h{i}].qlen > bin_size)
B[i][h{i}].p_mark += p_increment;
else if (B[i][h{i}].qlen == 0)
B[i][h{i}].p_mark -= p_decrement;
p_min = min(B[0][h{0}].p_mark ... B[L-1][h{L-1}].p_mark);
if (p_min == 1.0)
ratelimit();
else
mark/drop with probabilty p_min;
I did the adaptation of Juliusz code to meet current kernel standards,
and various changes to address previous comments :
http://thread.gmane.org/gmane.linux.network/90225
http://thread.gmane.org/gmane.linux.network/90375
Default flow classifier is the rxhash introduced by RPS in 2.6.35, but
we can use an external flow classifier if wanted.
tc qdisc add dev $DEV parent 1:11 handle 11: \
est 0.5sec 2sec sfb limit 128
tc filter add dev $DEV protocol ip parent 11: handle 3 \
flow hash keys dst divisor 1024
Notes:
1) SFB default child qdisc is pfifo_fast. It can be changed by another
qdisc but a child qdisc MUST not drop a packet previously queued. This
is because SFB needs to handle a dequeued packet in order to maintain
its virtual queue states. pfifo_head_drop or CHOKe should not be used.
2) ECN is enabled by default, unlike RED/CHOKe/GRED
With help from Patrick McHardy & Andi Kleen
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
CC: Juliusz Chroboczek <Juliusz.Chroboczek@pps.jussieu.fr>
CC: Stephen Hemminger <shemminger@vyatta.com>
CC: Patrick McHardy <kaber@trash.net>
CC: Andi Kleen <andi@firstfloor.org>
CC: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/Kconfig')
-rw-r--r-- | net/sched/Kconfig | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/net/sched/Kconfig b/net/sched/Kconfig index 8c19b6e3201e..a7a5583d4f68 100644 --- a/net/sched/Kconfig +++ b/net/sched/Kconfig | |||
@@ -126,6 +126,17 @@ config NET_SCH_RED | |||
126 | To compile this code as a module, choose M here: the | 126 | To compile this code as a module, choose M here: the |
127 | module will be called sch_red. | 127 | module will be called sch_red. |
128 | 128 | ||
129 | config NET_SCH_SFB | ||
130 | tristate "Stochastic Fair Blue (SFB)" | ||
131 | ---help--- | ||
132 | Say Y here if you want to use the Stochastic Fair Blue (SFB) | ||
133 | packet scheduling algorithm. | ||
134 | |||
135 | See the top of <file:net/sched/sch_sfb.c> for more details. | ||
136 | |||
137 | To compile this code as a module, choose M here: the | ||
138 | module will be called sch_sfb. | ||
139 | |||
129 | config NET_SCH_SFQ | 140 | config NET_SCH_SFQ |
130 | tristate "Stochastic Fairness Queueing (SFQ)" | 141 | tristate "Stochastic Fairness Queueing (SFQ)" |
131 | ---help--- | 142 | ---help--- |