Commit 9dc20c5f authored by John Dykstra's avatar John Dykstra Committed by David S. Miller
Browse files

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

This is an extension of a read-side patch by Eric Dumazet.
Signed-off-by: default avatarJohn Dykstra <>
Acked-by: default avatarEric Dumazet <>
Signed-off-by: default avatarDavid S. Miller <>
parent d44b5e07
......@@ -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_poll(sk->sk_sleep, POLLOUT |
if (sock->fasync_list && !(sk->sk_shutdown & SEND_SHUTDOWN))
sock_wake_async(sock, SOCK_WAKE_SPACE, POLL_OUT);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment