On Thursday 17 July 2008, Evgeniy Polyakov wrote:You lost me here :) The way I interpret the man page text is that it is ok for splice to block, even if SPLICE_F_NONBLOCK is set. The comments near SPLICE_F_NONBLOCK says the same thing: #define SPLICE_F_NONBLOCK (0x02) /* don't block on the pipe splicing (but */ /* we may still block on the fd we splice */ /* from/to, of course */ Am I missing something? For this "program": x=splice(socket, pipe, size, flags=0); if (x > 0) splice(pipe, file, x, flags=0); it is hard to come up with a non tiny value for size that does not deadlock the program, because the pipe size is measured in packets and not bytes and we have no control over the packet sizes. For example, if we set size=17 and we are unlucky and get 16 packets of 1 byte in a row, at the right time, the first splice call will block - and the program will deadlock since we can't reach the consumer. Thanks, tavi -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
| Greg Kroah-Hartman | [PATCH 008/196] Chinese: add translation of volatile-considered-harmful.txt |
| Amit K. Arora | [RFC] Heads up on sys_fallocate() |
| Bart Van Assche | Integration of SCST in the mainstream Linux kernel |
| Linus Torvalds | Re: Slow DOWN, please!!! |
git: | |
| Gerrit Renker | [PATCH 0/37] dccp: Feature negotiation - last call for comments |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| David Miller | [GIT]: Networking |
| Natalie Protasevich | [BUG] New Kernel Bugs |
