lkml.org 
[lkml]   [2008]   [Jul]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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


\
 
 \ /
  Last update: 2008-07-18 18:03    [W:0.087 / U:0.332 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site