lkml.org 
[lkml]   [2012]   [Jan]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] af_unix: fix EPOLLET regression for stream sockets
From
From: Eric Dumazet <eric.dumazet@gmail.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@freehaven.net>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
> Cc: Alexey Moiseytsev <himeraster@gmail.com>

Applied and queued up for -stable, thanks.


\
 
 \ /
  Last update: 2012-01-30 18:47    [W:0.044 / U:2.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site