[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20120130.124537.2246327212488304490.davem@davemloft.net>
Date: Mon, 30 Jan 2012 12:45:37 -0500 (EST)
From: David Miller <davem@...emloft.net>
To: eric.dumazet@...il.com
Cc: nickm@...ehaven.net, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, himeraster@...il.com
Subject: Re: [PATCH] af_unix: fix EPOLLET regression for stream sockets
From: Eric Dumazet <eric.dumazet@...il.com>
Date: Sun, 29 Jan 2012 03:11:03 +0100
> Commit 0884d7aa24 (AF_UNIX: Fix poll blocking problem when reading from
> a stream socket) added a regression for epoll() in Edge Triggered mode
> (EPOLLET)
>
> Appropriate fix is to use skb_peek()/skb_unlink() instead of
> skb_dequeue(), and only call skb_unlink() when skb is fully consumed.
>
> This remove the need to requeue a partial skb into sk_receive_queue head
> and the extra sk->sk_data_ready() calls that added the regression.
>
> This is safe because once skb is given to sk_receive_queue, it is not
> modified by a writer, and readers are serialized by u->readlock mutex.
>
> This also reduce number of spinlock acquisition for small reads or
> MSG_PEEK users so should improve overall performance.
>
> Reported-by: Nick Mathewson <nickm@...ehaven.net>
> Signed-off-by: Eric Dumazet <eric.dumazet@...il.com>
> Cc: Alexey Moiseytsev <himeraster@...il.com>
Applied and queued up for -stable, thanks.
--
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