Skip to contentSkip to conversation

splice support #3

PATCH Bodo Eggert 1 participant 1 message Mar 31, 2006 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 3 lines · Jens Axboe

Ok, this should be it, I hope. Fixed the remaining issues spotted by akpm, and also thanks to KAMEZAWA Hiroyuki for pointing out that the page moving logic could get confused.

a) JFTR: When I first read of splice, I imagined the splice call would replace the remote side of a pipe with any of the own fds (after flushing the buffer). E.g. cat could optionally call splice on the last input file and stdout, and on success, exit before the work is done. Is something like this planned?

(Yes, I didn't pay much attention.)

b) Having read Christoph's comment, I think the planned splice syscall should overlay the sendfile sysctl (keeping the historic name). Off cause the offset parameter will give you strange results (*) if you're expecting an input file, but I doubt there are programs using sendfile randomly, hoping it would fail on pipes.

If you do that, users can generically call sendfile and it will DTRT if possible.

*) Obviously offset = n on pipe-in_fd will either
- skip n bytes from a pipe/socket, and it will be decremented by the number of skipped bytes after returning from the syscall.
or
- be incremented by the number of copied bytes (no skipping happens).

Signature · 2 lines
Ich danke GMX dafür, die Verwendung meiner Adressen mittels per SPF
verbreiteten Lügen zu sabotieren.