diff options
author | stephen hemminger <shemminger@vyatta.com> | 2011-12-22 09:52:03 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-12-23 04:37:19 +0100 |
commit | 2c64580046a122fa15bb586d8ca4fd5e4b69a1e7 (patch) | |
tree | 65cacace18e88cb9eb60e564ee9e395feb62affa /net/netlink | |
parent | netlink: af_netlink cleanup (v2) (diff) | |
download | linux-2c64580046a122fa15bb586d8ca4fd5e4b69a1e7.tar.xz linux-2c64580046a122fa15bb586d8ca4fd5e4b69a1e7.zip |
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>
Diffstat (limited to 'net/netlink')
-rw-r--r-- | net/netlink/af_netlink.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index a0abfe0a537c..86a258d9af84 100644 --- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c @@ -959,7 +959,7 @@ static int netlink_broadcast_deliver(struct sock *sk, struct sk_buff *skb) skb_set_owner_r(skb, sk); skb_queue_tail(&sk->sk_receive_queue, skb); sk->sk_data_ready(sk, skb->len); - return atomic_read(&sk->sk_rmem_alloc) > sk->sk_rcvbuf; + return atomic_read(&sk->sk_rmem_alloc) > (sk->sk_rcvbuf >> 1); } return -1; } |