Commit 2c64580046a122fa15bb586d8ca4fd5e4b69a1e7
Committed by
David S. Miller
1 parent
b57ef81ff8
Exists in
master
and in
38 other branches
netlink: wake up netlink listeners sooner (v2)
This patch changes it to yield sooner at halfway instead. Still not a cure-all for listener overrun if listner is slow, but works much reliably. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff
net/netlink/af_netlink.c
... | ... | @@ -959,7 +959,7 @@ |
959 | 959 | skb_set_owner_r(skb, sk); |
960 | 960 | skb_queue_tail(&sk->sk_receive_queue, skb); |
961 | 961 | sk->sk_data_ready(sk, skb->len); |
962 | - return atomic_read(&sk->sk_rmem_alloc) > sk->sk_rcvbuf; | |
962 | + return atomic_read(&sk->sk_rmem_alloc) > (sk->sk_rcvbuf >> 1); | |
963 | 963 | } |
964 | 964 | return -1; |
965 | 965 | } |