summaryrefslogtreecommitdiff
path: root/net/core
diff options
context:
space:
mode:
authorJohn Dykstra <john.dykstra1@gmail.com>2009-05-12 15:34:50 +0000
committerDavid S. Miller <davem@davemloft.net>2009-05-17 20:44:43 -0700
commit9dc20c5f78c53bf57fb7874b6e942842e1db20d3 (patch)
tree07703de691fc0b6d50b4dc5d206e8f841714b7e1 /net/core
parentd44b5e07c6813e6d747f7f947f1da5f0abf14eb4 (diff)
tcp: tcp_prequeue() can use keyed wakeups
When TCP frees up write buffer space, avoid waking up tasks that have done a poll() or select() on the same socket specifying read-side events. This is an extension of a read-side patch by Eric Dumazet. Signed-off-by: John Dykstra <john.dykstra1@gmail.com> Acked-by: Eric Dumazet <dada1@cosmosbay.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/stream.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/core/stream.c b/net/core/stream.c
index 8727cead64ad..a37debfeb1b2 100644
--- a/net/core/stream.c
+++ b/net/core/stream.c
@@ -33,7 +33,8 @@ void sk_stream_write_space(struct sock *sk)
clear_bit(SOCK_NOSPACE, &sock->flags);
if (sk->sk_sleep && waitqueue_active(sk->sk_sleep))
- wake_up_interruptible(sk->sk_sleep);
+ wake_up_interruptible_poll(sk->sk_sleep, POLLOUT |
+ POLLWRNORM | POLLWRBAND);
if (sock->fasync_list && !(sk->sk_shutdown & SEND_SHUTDOWN))
sock_wake_async(sock, SOCK_WAKE_SPACE, POLL_OUT);
}