[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20091105105749.GA4901@rabbit.intern.cm-ag>
Date: Thu, 5 Nov 2009 11:57:49 +0100
From: Max Kellermann <mk@...all.com>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: linux-kernel@...r.kernel.org, jens.axboe@...cle.com,
Linux Netdev List <netdev@...r.kernel.org>
Subject: Re: [PATCH] tcp: set SPLICE_F_NONBLOCK after first buffer has been
spliced
On 2009/11/05 11:30, Eric Dumazet <eric.dumazet@...il.com> wrote:
> I dont think this patch is correct. Could you describe your use case ?
See my second email, there's a demo source.
> If you dont want to block on output pipe, you should set this NONBLOCK
> flag before calling splice(SPLICE_F_NONBLOCK) syscall.
>
> ie : Use the socket in blocking mode, but output pipe in non-blocking mode.
Do you think that a splice() should block if the socket is readable
and the pipe is writable according to select()?
"The correct behavior would be to copy as much as possible, and return
without blocking. Block only if nothing can be transferred."
Do you disagree with that?
> Some application could have a thread working in full blocking mode,
> and have another thread reading the pipe (and eventually unblocking
> first thread)
I don't get this objection. Please explain.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists