Re: [PATCH net-next 1/2] net: SOCKWQ_ASYNC_NOSPACE optimizations

2016-05-08 Thread Jiri Pirko
Mon, May 02, 2016 at 10:45:44PM CEST, j...@resnulli.us wrote: >Mon, May 02, 2016 at 10:23:27PM CEST, eric.duma...@gmail.com wrote: >>On Mon, 2016-05-02 at 21:12 +0200, Jiri Pirko wrote: >>> Mon, May 02, 2016 at 06:22:18PM CEST, eric.duma...@gmail.com wrote: >>> >On Mon, 2016-05-02 at 18:16 +0200, J

Re: [PATCH net-next 1/2] net: SOCKWQ_ASYNC_NOSPACE optimizations

2016-05-02 Thread Eric Dumazet
On Mon, 2016-05-02 at 16:31 -0400, David Miller wrote: > From: Eric Dumazet > Date: Mon, 02 May 2016 13:23:27 -0700 > > > It looks like net/sunrpc/xprtsock.c should set SOCK_FASYNC > > even if it is not actually using fasync_list > > > > Could you try this quick hack to check if this is the righ

Re: [PATCH net-next 1/2] net: SOCKWQ_ASYNC_NOSPACE optimizations

2016-05-02 Thread Jiri Pirko
Mon, May 02, 2016 at 10:23:27PM CEST, eric.duma...@gmail.com wrote: >On Mon, 2016-05-02 at 21:12 +0200, Jiri Pirko wrote: >> Mon, May 02, 2016 at 06:22:18PM CEST, eric.duma...@gmail.com wrote: >> >On Mon, 2016-05-02 at 18:16 +0200, Jiri Pirko wrote: >> >> Mon, Apr 25, 2016 at 07:39:32PM CEST, eduma

Re: [PATCH net-next 1/2] net: SOCKWQ_ASYNC_NOSPACE optimizations

2016-05-02 Thread David Miller
From: Eric Dumazet Date: Mon, 02 May 2016 13:23:27 -0700 > It looks like net/sunrpc/xprtsock.c should set SOCK_FASYNC > even if it is not actually using fasync_list > > Could you try this quick hack to check if this is the right way ? Indeed, it tests the ASYNC bit without enabling FASYNC. The

Re: [PATCH net-next 1/2] net: SOCKWQ_ASYNC_NOSPACE optimizations

2016-05-02 Thread Eric Dumazet
On Mon, 2016-05-02 at 21:12 +0200, Jiri Pirko wrote: > Mon, May 02, 2016 at 06:22:18PM CEST, eric.duma...@gmail.com wrote: > >On Mon, 2016-05-02 at 18:16 +0200, Jiri Pirko wrote: > >> Mon, Apr 25, 2016 at 07:39:32PM CEST, eduma...@google.com wrote: > >> >SOCKWQ_ASYNC_NOSPACE is tested in sock_wake_

Re: [PATCH net-next 1/2] net: SOCKWQ_ASYNC_NOSPACE optimizations

2016-05-02 Thread Jiri Pirko
Mon, May 02, 2016 at 06:22:18PM CEST, eric.duma...@gmail.com wrote: >On Mon, 2016-05-02 at 18:16 +0200, Jiri Pirko wrote: >> Mon, Apr 25, 2016 at 07:39:32PM CEST, eduma...@google.com wrote: >> >SOCKWQ_ASYNC_NOSPACE is tested in sock_wake_async() >> >so that a SIGIO signal is sent when needed. >> >

Re: [PATCH net-next 1/2] net: SOCKWQ_ASYNC_NOSPACE optimizations

2016-05-02 Thread Eric Dumazet
On Mon, 2016-05-02 at 18:16 +0200, Jiri Pirko wrote: > Mon, Apr 25, 2016 at 07:39:32PM CEST, eduma...@google.com wrote: > >SOCKWQ_ASYNC_NOSPACE is tested in sock_wake_async() > >so that a SIGIO signal is sent when needed. > > > >tcp_sendmsg() clears the bit. > >tcp_poll() sets the bit when stream i

Re: [PATCH net-next 1/2] net: SOCKWQ_ASYNC_NOSPACE optimizations

2016-05-02 Thread Jiri Pirko
Mon, Apr 25, 2016 at 07:39:32PM CEST, eduma...@google.com wrote: >SOCKWQ_ASYNC_NOSPACE is tested in sock_wake_async() >so that a SIGIO signal is sent when needed. > >tcp_sendmsg() clears the bit. >tcp_poll() sets the bit when stream is not writeable. > >We can avoid two atomic operations by first c

[PATCH net-next 1/2] net: SOCKWQ_ASYNC_NOSPACE optimizations

2016-04-25 Thread Eric Dumazet
SOCKWQ_ASYNC_NOSPACE is tested in sock_wake_async() so that a SIGIO signal is sent when needed. tcp_sendmsg() clears the bit. tcp_poll() sets the bit when stream is not writeable. We can avoid two atomic operations by first checking if socket is actually interested in the FASYNC business (most so