Thread (34 messages) 34 messages, 4 authors, 2011-03-04

Re: [PATCH] sched: QFQ - quick fair queue scheduler (v4)

flat view

From: Stephen Hemminger <hidden>
Date: 2011-03-04 17:19:01

On Fri, 04 Mar 2011 07:50:26 +0100
Eric Dumazet [off-list ref] wrote:
Le jeudi 03 mars 2011 à 16:30 -0800, Stephen Hemminger a écrit :
quoted
This is an implementation of the Quick Fair Queue scheduler developed
by Fabio Checconi. The same algorithm is already implemented in ipfw
in FreeBSD. Fabio had an earlier version developed on Linux, I just
cleaned it up.  Thanks to Eric Dumazet for doing the testing and
finding bugs.

Signed-off-by: Stephen Hemminger <redacted>

---
v4 - change slots[] to hlist from simple linked list

 include/linux/pkt_sched.h |   15 
 net/sched/Kconfig         |   11 
 net/sched/Makefile        |    1 
 net/sched/sch_qfq.c       | 1133 ++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 1160 insertions(+)
Thanks

Still crashing hard here in qfq_reset_qdisc(), when packets are present
in queues.

Probably hlist_for_each_entry_safe() is needed, since
qfq_deactivate_class() is called ...

Also rename cl->next to cl->hnode so that following is clearer ?

-	hlist_for_each_entry(cl, n, &grp->slots[j], next) {
+	hlist_for_each_entry_safe(cl, n, next, &grp->slots[j], hnode) {

Fabio, any idea why everything is blocked after a few packets for me ?

Here is script to reproduce the problem :

# cat qfq_setup.sh
modprobe dummy

ifconfig dummy0 10.2.2.254 netmask 255.255.255.0 up

for i in `seq 1 16`
do
 arp -H ether -i dummy0 -s 10.2.2.$i 00:00:0c:07:ac:$(printf %02x $i)
done

DEV=dummy0
RATE="rate 40Mbit"
TNETS="10.2.2.0/25"
ALLOT="allot 20000"

tc qdisc del dev dummy0 root 2>/dev/null

tc qdisc add dev $DEV root handle 1: cbq avpkt 1000 rate 1000Mbit \
	bandwidth 1000Mbit
QFQ is non work conserving, it may choose to send a smaller packet
ahead of a larger packet in other flow...


-- 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help