Re: [PATCH] tcp: do not promote SPLICE_F_NONBLOCK to socket O_NONBLOCK
From: Evgeniy Polyakov
Date: Fri Jul 18 2008 - 12:00:32 EST
On Fri, Jul 18, 2008 at 06:50:07PM +0300, Octavian Purdila (opurdila@xxxxxxxxxxx) 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
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/