Messages in this thread | | | Date | Fri, 18 Jul 2008 20:00:10 +0400 | From | Evgeniy Polyakov <> | Subject | Re: [PATCH] tcp: do not promote SPLICE_F_NONBLOCK to socket O_NONBLOCK |
| |
On Fri, Jul 18, 2008 at 06:50:07PM +0300, Octavian Purdila (opurdila@ixiacom.com) wrote: > > If there are 20 packets in the queue it will get 16 and put them into > > another end (in the next call in your example). Where will it block? > > It will take 17 because this is what the user requested. And when trying to > push the 17th on the pipe, it will block. I base this both on experiments and > on my understanding of the tcp splice receive implementation.
Seems like we do not understand each other. How it can take 17 if there are only 16 pages? By 'push' you mean splice-into-pipe or splice-out-of-pipe-into-other-fd? Where exactly will it block?
> > Btw, you are also trying to change existing userspace API, which may be > > very much forbidden at this stage. > > If people here will be telling me that for splice you must always use > non-blocking I/O since you can't get the blocking case to work reliably, than > I will accept that. After all, they know better :)
It may be not because of how is right or wrong, but that some userspace can already rely on existing behaviour of the flag, and changing it (even to more correct) may break some application in a really non-trivial way.
-- Evgeniy Polyakov
| |