Re: Splice on blocking TCP sockets again..
From: Jason Gunthorpe <hidden>
Date: 2009-09-30 05:40:28
From: Jason Gunthorpe <hidden>
Date: 2009-09-30 05:40:28
One way to handle this is to switch tcp_read() to use the underlying file O_NONBLOCK flag, as other socket operations do. And let SPLICE_F_NONBLOCK control the pipe output only.
Thanks Eric, this seems reasonable from my userspace perspective. I admit I don't understand why SPLICE_F_NONBLOCK exists, it seems very un-unixy to have a syscall completely ignore the NONBLOCK flag of the fd it is called on. Ie setting NONBLOCK on the pipe itself does nothing when using splice.. Jason