Re: [PATCH] tcp: set SPLICE_F_NONBLOCK after first buffer has beenspliced

From: Max Kellermann
Date: Thu Nov 05 2009 - 08:23:53 EST

On 2009/11/05 12:21, Eric Dumazet <eric.dumazet@xxxxxxxxx> wrote:
> Max Kellermann a écrit :
> > Do you think that a splice() should block if the socket is readable
> > and the pipe is writable according to select()?
> >
> Yes, this is perfectly legal
> select() can return "OK to write on fd",
> and still, write(fd, buffer, 10000000) is supposer/allowed to block if fd is not O_NDELAY

>From the select() manpage: "those in writefds will be watched to see
if a write will not block"

>From the poll() manpage: "Writing now will not block."

This looks unambiguous to me, and contradicts with your thesis. Can
you provide sources?

What is your interpretation of the guarantees provided by select() and
poll()? Which byte count is "ok" to write after POLLOUT, and how much
is "too much"? How does the application know?

> Please read recent commit on this area and why I think your patch
> conflicts with this commit.

I understand your patch, but I don't understand the conflict with my
patch. Can you describe a breakage caused by my patch?
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at