net/fq_impl: do not maintain a backlog-sorted list of flows
authorFelix Fietkau <nbd@nbd.name>
Fri, 18 Dec 2020 18:47:15 +0000 (19:47 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 21 Jan 2021 12:33:45 +0000 (13:33 +0100)
commitd7b649291782430904e17cde2ebfc90f76021ca5
tree2c48e22f5ec5b47f00a05e2b547fc9ea8e74df8f
parentbf9009bf21b53501f2abb2f59f9314d85bde5fc9
net/fq_impl: do not maintain a backlog-sorted list of flows

A sorted flow list is only needed to drop packets in the biggest flow when
hitting the overmemory condition.
By scanning flows only when needed, we can avoid paying the cost of
maintaining the list under normal conditions
In order to avoid scanning lots of empty flows and touching too many cold
cache lines, a bitmap of flows with backlog is maintained

Signed-off-by: Felix Fietkau <nbd@nbd.name>
Link: https://lore.kernel.org/r/20201218184718.93650-3-nbd@nbd.name
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
include/net/fq.h
include/net/fq_impl.h
net/mac80211/tx.c