]> git.baikalelectronics.ru Git - kernel.git/commit
net_sched: restore qdisc quota fairness limits after bulk dequeue
authorJesper Dangaard Brouer <brouer@redhat.com>
Thu, 9 Oct 2014 10:18:10 +0000 (12:18 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 9 Oct 2014 23:12:26 +0000 (19:12 -0400)
commitf6c1b519ff189cae2f2eca0e3aa3b697facffaf1
tree2124d9c6206150afc63e952ff597b29522ecdd21
parentff5b54a94a45f3e7abd759a9d7aaf6daf7f3ca91
net_sched: restore qdisc quota fairness limits after bulk dequeue

Restore the quota fairness between qdisc's, that we broke with commit
f340d57d28 ("qdisc: bulk dequeue support for qdiscs with TCQ_F_ONETXQUEUE").

Before that commit, the quota in __qdisc_run() were in packets as
dequeue_skb() would only dequeue a single packet, that assumption
broke with bulk dequeue.

We choose not to account for the number of packets inside the TSO/GSO
packets (accessable via "skb_gso_segs").  As the previous fairness
also had this "defect". Thus, GSO/TSO packets counts as a single
packet.

Further more, we choose to slack on accuracy, by allowing a bulk
dequeue try_bulk_dequeue_skb() to exceed the "packets" limit, only
limited by the BQL bytelimit.  This is done because BQL prefers to get
its full budget for appropriate feedback from TX completion.

In future, we might consider reworking this further and, if it allows,
switch to a time-based model, as suggested by Eric. Right now, we only
restore old semantics.

Joint work with Eric, Hannes, Daniel and Jesper.  Hannes wrote the
first patch in cooperation with Daniel and Jesper.  Eric rewrote the
patch.

Fixes: f340d57d28 ("qdisc: bulk dequeue support for qdiscs with TCQ_F_ONETXQUEUE")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/sch_generic.c