linux/net
Jon Maloy 7c5b420559 tipc: reduce risk of wakeup queue starvation
In commit 365ad353c2 ("tipc: reduce risk of user starvation during
link congestion") we allowed senders to add exactly one list of extra
buffers to the link backlog queues during link congestion (aka
"oversubscription"). However, the criteria for when to stop adding
wakeup messages to the input queue when the overload abates is
inaccurate, and may cause starvation problems during very high load.

Currently, we stop adding wakeup messages after 10 total failed attempts
where we find that there is no space left in the backlog queue for a
certain importance level. The counter for this is accumulated across all
levels, which may lead the algorithm to leave the loop prematurely,
although there may still be plenty of space available at some levels.
The result is sometimes that messages near the wakeup queue tail are not
added to the input queue as they should be.

We now introduce a more exact algorithm, where we keep adding wakeup
messages to a level as long as the backlog queue has free slots for
the corresponding level, and stop at the moment there are no more such
slots or when there are no more wakeup messages to dequeue.

Fixes: 365ad35 ("tipc: reduce risk of user starvation during link congestion")
Reported-by: Tung Nguyen <tung.q.nguyen@dektech.com.au>
Acked-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-08-01 18:19:28 -04:00
..
6lowpan
9p
802
8021q
appletalk net: Use skb_frag_off accessors 2019-07-30 14:21:32 -07:00
atm
ax25
batman-adv
bluetooth
bpf
bpfilter
bridge net: bridge: mcast: add delete due to fast-leave mdb flag 2019-07-31 19:13:40 -04:00
caif
can can: fix ioctl function removal 2019-07-29 14:12:35 -07:00
ceph
core net: Use skb_frag_off accessors 2019-07-30 14:21:32 -07:00
dcb
dccp
decnet
dns_resolver
dsa net: dsa: ksz: Add KSZ8795 tag code 2019-07-30 15:12:50 -07:00
ethernet
hsr
ieee802154
ife
ipv4 net: Use skb_frag_off accessors 2019-07-30 14:21:32 -07:00
ipv6 ipv6: remove printk 2019-07-27 14:23:48 -07:00
iucv
kcm net: Use skb_frag_off accessors 2019-07-30 14:21:32 -07:00
key
l2tp
l3mdev
lapb
llc
mac80211 mac80211: HE STA disassoc due to QOS NULL not sent 2019-07-31 13:26:41 +02:00
mac802154
mpls
ncsi
netfilter
netlabel
netlink
netrom
nfc NFC: fix attrs checks in netlink interface 2019-07-29 08:56:26 -07:00
nsh
openvswitch
packet
phonet
psample
qrtr
rds
rfkill
rose
rxrpc rxrpc: Fix -Wframe-larger-than= warnings from on-stack crypto 2019-07-30 10:32:35 -07:00
sched
sctp sctp: factor out sctp_connect_add_peer 2019-07-30 14:18:14 -07:00
smc
strparser
sunrpc
switchdev
tipc tipc: reduce risk of wakeup queue starvation 2019-08-01 18:19:28 -04:00
tls net: Use skb_frag_off accessors 2019-07-30 14:21:32 -07:00
unix
vmw_vsock vsock/virtio: change the maximum packet size allowed 2019-07-30 15:00:00 -07:00
wimax
wireless nl80211: add strict start type 2019-07-31 11:00:52 +02:00
x25
xdp
xfrm net: Use skb_frag_off accessors 2019-07-30 14:21:32 -07:00
compat.c
Kconfig
Makefile
socket.c
sysctl_net.c