I better send a copy of this one to the mailing list...
please cc me, i'm not subscribed.
regards,
Miguel
--- Begin Message ---
Hi Alexey, Hi David,
I've found a slot "leak" in sch_sfq.c that occurs with current 2.4 and
2.6 kernels. After dequeueing the last skb from a given slot, this slot
might be reused by a different hash (say new_hash). However the old hash
(q->ht[old_hash]) still points to the (now) reused slot. When new skb's
arrive with old_hash they will be enqueued at the same slot as new_hash
skb's (that is, q->ht[old_hash] == q->ht[new_hash]).
This produce a "slot clash" (opposed to a "hash clash"), severely
affecting the effectiveness of SFQ to provide fairness.
The attached one line patch fixes it, freeing the slot when last skb is
dequeued.
Note: I've noticed this problem while testing a fixed hash function of
the IP. the number of active slots didn't matched the number of active
IP clients. I have created a small standalone application, using
sch_sfq.c, to reproduce and debug this problem. I may provide this
application and a small data set (sequence of enqueues/dequeues) that
trigger the problem, let me know if you need it.
regards,
Miguel Freitas
sfq-slot-clash-fix.patch
Description: Text Data
--- End Message ---
|