]> git.baikalelectronics.ru Git - kernel.git/commit
net: SOCKWQ_ASYNC_NOSPACE optimizations
authorEric Dumazet <edumazet@google.com>
Mon, 25 Apr 2016 17:39:32 +0000 (10:39 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 28 Apr 2016 03:08:40 +0000 (23:08 -0400)
commit958b748b7b9864dd5f443c26206cd3d4483a522c
tree74386478ca6ff2a989a68db8c8691933e4248f6a
parent75b0d09955d2a33d09634905985f515dad1a00cc
net: SOCKWQ_ASYNC_NOSPACE optimizations

SOCKWQ_ASYNC_NOSPACE is tested in sock_wake_async()
so that a SIGIO signal is sent when needed.

tcp_sendmsg() clears the bit.
tcp_poll() sets the bit when stream is not writeable.

We can avoid two atomic operations by first checking if socket
is actually interested in the FASYNC business (most sockets in
real applications do not use AIO, but select()/poll()/epoll())

This also removes one cache line miss to access sk->sk_wq->flags
in tcp_sendmsg()

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/sock.h