]> 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)
commit6525a46bd9f9e09d9d4128467342af3ef1438a7e
tree74386478ca6ff2a989a68db8c8691933e4248f6a
parent5c25d47c0e1b6755f42ec9e5ba170941e4189d74
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