Re: [PATCH 2.6.23-rc6 Resending] NETWORKING : Edge Triggered EPOLLOUT events get missed for TCP sockets

2007-09-21 Thread Davide Libenzi
On Thu, 20 Sep 2007, Nagendra Tomar wrote: > > That's not what POLLOUT means in the Unix meaning. POLLOUT indicates the > > ability to write, and it is not meant as to signal every time a packet > > (skb) is sent on the wire (and the buffer released). > > Aren't they both the same ? Everytime a

Re: [PATCH 2.6.23-rc6 Resending] NETWORKING : Edge Triggered EPOLLOUT events get missed for TCP sockets

2007-09-20 Thread Nagendra Tomar
--- Davide Libenzi <[EMAIL PROTECTED]> wrote: > That's not what POLLOUT means in the Unix meaning. POLLOUT indicates the > ability to write, and it is not meant as to signal every time a packet > (skb) is sent on the wire (and the buffer released). Aren't they both the same ? Everytime an inc

Re: [PATCH 2.6.23-rc6 Resending] NETWORKING : Edge Triggered EPOLLOUT events get missed for TCP sockets

2007-09-20 Thread Davide Libenzi
On Thu, 20 Sep 2007, Nagendra Tomar wrote: > > --- Davide Libenzi <[EMAIL PROTECTED]> wrote: > > > Looking back at it, I think the current TCP code is right, once you look > > at the "event" to be a output buffer full->with_space transition. > > If you drop an fd inside epoll with EPOLLOUT|EPOL

Re: [PATCH 2.6.23-rc6 Resending] NETWORKING : Edge Triggered EPOLLOUT events get missed for TCP sockets

2007-09-20 Thread Nagendra Tomar
--- Davide Libenzi <[EMAIL PROTECTED]> wrote: > > Unfortunately f_op->poll() does not let the caller to specify the events > it's interested in, that would allow to split send/recevie wait queues and > better detect read/write cases. > The detection of a waitqueue_active(->sk_wr_sleep) would w

Re: [PATCH 2.6.23-rc6 Resending] NETWORKING : Edge Triggered EPOLLOUT events get missed for TCP sockets

2007-09-20 Thread Nagendra Tomar
--- Davide Libenzi <[EMAIL PROTECTED]> wrote: > Looking back at it, I think the current TCP code is right, once you look > at the "event" to be a output buffer full->with_space transition. > If you drop an fd inside epoll with EPOLLOUT|EPOLLET and you get an event > (free space on the output bu

Re: [PATCH 2.6.23-rc6 Resending] NETWORKING : Edge Triggered EPOLLOUT events get missed for TCP sockets

2007-09-20 Thread Davide Libenzi
On Thu, 20 Sep 2007, Eric Dumazet wrote: > Does it means that with your patch each ACK on a ET managed socket will > trigger an epoll event ? > > Maybe your very sensitive high throuput appication needs to set a flag or > something at socket level to ask for such a behavior. > > The default sh

Re: [PATCH 2.6.23-rc6 Resending] NETWORKING : Edge Triggered EPOLLOUT events get missed for TCP sockets

2007-09-20 Thread Davide Libenzi
On Wed, 19 Sep 2007, Nagendra Tomar wrote: > The tcp_check_space() function calls tcp_new_space() only if the > SOCK_NOSPACE bit is set in the socket flags. This is causing Edge Triggered > EPOLLOUT events to be missed for TCP sockets, as the ep_poll_callback() > is not called from the wakeup rou

Re: [PATCH 2.6.23-rc6 Resending] NETWORKING : Edge Triggered EPOLLOUT events get missed for TCP sockets

2007-09-20 Thread Nagendra Tomar
--- Eric Dumazet <[EMAIL PROTECTED]> wrote: > Nagendra Tomar a écrit : > > --- Davide Libenzi <[EMAIL PROTECTED]> wrote: > > > >> On Wed, 19 Sep 2007, David Miller wrote: > >> > >>> From: Nagendra Tomar <[EMAIL PROTECTED]> > >>> Date: Wed, 19 Sep 2007 15:37:09 -0700 (PDT) > >>> > With the S

Re: [PATCH 2.6.23-rc6 Resending] NETWORKING : Edge Triggered EPOLLOUT events get missed for TCP sockets

2007-09-19 Thread Eric Dumazet
Nagendra Tomar a écrit : --- Davide Libenzi <[EMAIL PROTECTED]> wrote: On Wed, 19 Sep 2007, David Miller wrote: From: Nagendra Tomar <[EMAIL PROTECTED]> Date: Wed, 19 Sep 2007 15:37:09 -0700 (PDT) With the SOCK_NOSPACE check in tcp_check_space(), this epoll_wait call will not return, even w

Re: [PATCH 2.6.23-rc6 Resending] NETWORKING : Edge Triggered EPOLLOUT events get missed for TCP sockets

2007-09-19 Thread Davide Libenzi
On Wed, 19 Sep 2007, Nagendra Tomar wrote: > Definitely not ! > > The point is that the "tcp write space available" > wakeup does not get called if SOCK_NOSPACE bit is not set. This was > fine when the wakeup was merely a wakeup (since SOCK_NOSPACE bit > indicated that someone really cared abt

Re: [PATCH 2.6.23-rc6 Resending] NETWORKING : Edge Triggered EPOLLOUT events get missed for TCP sockets

2007-09-19 Thread Nagendra Tomar
--- Davide Libenzi <[EMAIL PROTECTED]> wrote: > On Wed, 19 Sep 2007, David Miller wrote: > > > From: Nagendra Tomar <[EMAIL PROTECTED]> > > Date: Wed, 19 Sep 2007 15:37:09 -0700 (PDT) > > > > > With the SOCK_NOSPACE check in tcp_check_space(), this epoll_wait call > > > will > > > not return,

Re: [PATCH 2.6.23-rc6 Resending] NETWORKING : Edge Triggered EPOLLOUT events get missed for TCP sockets

2007-09-19 Thread Nagendra Tomar
--- David Miller <[EMAIL PROTECTED]> wrote: > From: Nagendra Tomar <[EMAIL PROTECTED]> > Date: Wed, 19 Sep 2007 15:55:58 -0700 (PDT) > > > I agree that setting SOCK_NOSPACE would have been a more elegant > > fix. Infact I thought a lot about that before deciding on this fix. > > I guess th

Re: [PATCH 2.6.23-rc6 Resending] NETWORKING : Edge Triggered EPOLLOUT events get missed for TCP sockets

2007-09-19 Thread Davide Libenzi
On Wed, 19 Sep 2007, David Miller wrote: > From: Nagendra Tomar <[EMAIL PROTECTED]> > Date: Wed, 19 Sep 2007 15:37:09 -0700 (PDT) > > > With the SOCK_NOSPACE check in tcp_check_space(), this epoll_wait call will > > not return, even when the incoming acks free the buffers. > > Note that

Re: [PATCH 2.6.23-rc6 Resending] NETWORKING : Edge Triggered EPOLLOUT events get missed for TCP sockets

2007-09-19 Thread David Miller
From: Nagendra Tomar <[EMAIL PROTECTED]> Date: Wed, 19 Sep 2007 15:55:58 -0700 (PDT) > I agree that setting SOCK_NOSPACE would have been a more elegant > fix. Infact I thought a lot about that before deciding on this fix. I guess this means you also noticed that you are removing the one and

Re: [PATCH 2.6.23-rc6 Resending] NETWORKING : Edge Triggered EPOLLOUT events get missed for TCP sockets

2007-09-19 Thread Nagendra Tomar
--- David Miller <[EMAIL PROTECTED]> wrote: > From: Nagendra Tomar <[EMAIL PROTECTED]> > Date: Wed, 19 Sep 2007 15:37:09 -0700 (PDT) > > > With the SOCK_NOSPACE check in tcp_check_space(), this epoll_wait call will > > not return, even when the incoming acks free the buffers. > > Note t

Re: [PATCH 2.6.23-rc6 Resending] NETWORKING : Edge Triggered EPOLLOUT events get missed for TCP sockets

2007-09-19 Thread David Miller
From: Nagendra Tomar <[EMAIL PROTECTED]> Date: Wed, 19 Sep 2007 15:37:09 -0700 (PDT) > With the SOCK_NOSPACE check in tcp_check_space(), this epoll_wait call will > not return, even when the incoming acks free the buffers. > Note that this patch assumes that the SOCK_NOSPACE check in > tc

[PATCH 2.6.23-rc6 Resending] NETWORKING : Edge Triggered EPOLLOUT events get missed for TCP sockets

2007-09-19 Thread Nagendra Tomar
The tcp_check_space() function calls tcp_new_space() only if the SOCK_NOSPACE bit is set in the socket flags. This is causing Edge Triggered EPOLLOUT events to be missed for TCP sockets, as the ep_poll_callback() is not called from the wakeup routine. The SOCK_NOSPACE bit indicates the us