[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1432141796.4060.28.camel@edumazet-glaptop2.roam.corp.google.com>
Date: Wed, 20 May 2015 10:09:56 -0700
From: Eric Dumazet <eric.dumazet@...il.com>
To: Jason Baron <jbaron@...mai.com>
Cc: davem@...emloft.net, netdev@...r.kernel.org
Subject: Re: [PATCH net-next v2] tcp: ensure epoll edge trigger wakeup when
write queue is empty
On Wed, 2015-05-20 at 15:52 +0000, Jason Baron wrote:
> From: Jason Baron <jbaron@...mai.com>
>
> We currently rely on the setting of SOCK_NOSPACE in the write()
> path to ensure that we wake up any epoll edge trigger waiters when
> acks return to free space in the write queue. However, if we fail
> to allocate even a single skb in the write queue, we could end up
> waiting indefinitely.
>
> Fix this by explicitly issuing a wakeup when we detect the condition
> of an empty write queue and a return value of -EAGAIN. This allows
> userspace to re-try as we expect this to be a temporary failure.
>
> I've tested this approach by artificially making
> sk_stream_alloc_skb() return NULL periodically. In that case,
> epoll edge trigger waiters will hang indefinitely in epoll_wait()
> without this patch.
>
> Signed-off-by: Jason Baron <jbaron@...mai.com>
> ---
Acked-by: Eric Dumazet <edumazet@...gle.com>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists