From: Benjamin LaHaise <[EMAIL PROTECTED]>
Date: Fri, 9 Dec 2005 17:31:48 -0500

> AF_UNIX stream socket performance on P4 CPUs tends to suffer due to a lot 
> of pipeline flushes from atomic operations.  The patch below removes the 
> sock_hold() and sock_put() in unix_stream_sendmsg().  This should be safe 
> as the socket still holds a reference to its peer which is only released 
> after the file descriptor's final user invokes unix_release_sock().  The 
> only consideration is that we must add a memory barrier before setting 
> the peer initially.
> 
> Signed-off-by: Benjamin LaHaise <[EMAIL PROTECTED]>

Looks good, for stream sockets there is indeed a strict
parent->child refcount relationship between a socket and
it's peer, so this optimization is valid.

I think I'll queue this up for 2.6.16, thanks again Ben.

-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to