Skip to content
Commit 77b75f4d authored by Rainer Weikusat's avatar Rainer Weikusat Committed by David S. Miller
Browse files

unix: use wq_has_sleeper in unix_dgram_recvmsg



The current unix_dgram_recvmsg does a wake up for every received
datagram. This seems wasteful as only SOCK_DGRAM client sockets in an
n:1 association with a server socket will ever wait because of the
associated condition. The patch below changes the function such that the
wake up only happens if wq_has_sleeper indicates that someone actually
wants to be notified. Testing with SOCK_SEQPACKET and SOCK_DGRAM socket
seems to confirm that this is an improvment.

Signed-Off-By: default avatarRainer Weikusat <rweikusat@mobileactivedefense.com>

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 75c4a57c
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