Re: [PATCH v2 3/3] af_unix: optimize the unix_dgram_recvmsg()

2015-10-05 Thread Jason Baron
On 10/05/2015 03:41 AM, Peter Zijlstra wrote: > On Fri, Oct 02, 2015 at 08:44:02PM +, Jason Baron wrote: >> diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c >> index f789423..b8ed1bc 100644 >> --- a/net/unix/af_unix.c >> +++ b/net/unix/af_unix.c > >> @@ -1079,6 +1079,9 @@ static long unix_

Re: [PATCH v2 3/3] af_unix: optimize the unix_dgram_recvmsg()

2015-10-05 Thread Peter Zijlstra
On Fri, Oct 02, 2015 at 08:44:02PM +, Jason Baron wrote: > diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c > index f789423..b8ed1bc 100644 > --- a/net/unix/af_unix.c > +++ b/net/unix/af_unix.c > @@ -1079,6 +1079,9 @@ static long unix_wait_for_peer(struct sock *other, long > timeo) > >

[PATCH v2 3/3] af_unix: optimize the unix_dgram_recvmsg()

2015-10-02 Thread Jason Baron
Now that connect() permanently registers a callback routine, we can induce extra overhead in unix_dgram_recvmsg(), which unconditionally wakes up its peer_wait queue on every receive. This patch makes the wakeup there conditional on there being waiters interested in wait events. Signed-off-by: Jas