Skip to content
  • Eric Dumazet's avatar
    net: SOCKWQ_ASYNC_NOSPACE optimizations · 9317bb69
    Eric Dumazet authored
    
    
    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: default avatarEric Dumazet <edumazet@google.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    9317bb69