Skip to content
Commit 830a1e5c authored by Benjamin LaHaise's avatar Benjamin LaHaise Committed by David S. Miller
Browse files

[AF_UNIX]: Remove superfluous reference counting in unix_stream_sendmsg



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: default avatarBenjamin LaHaise <benjamin.c.lahaise@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c1cbe4b7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment