On the other hand you could consider sendfile to be a concept rather
than an optimization. That is, "move n bytes from this fd to that
one". That would be very nice for this like tar (file <-> file or
tty), cp (file <-> file), application-level routing (socket <->
socket). Hey, even cat(1) would be simplified.
Whether the kernel can optimize it in zero-copy mode is another
problem that will change with time anyway. But the "I want to move x
amount of data from here to there, and I don't need to see the actual
contents" is something that happens quite often, and to be able to do
it with one syscall that does not muck with page tables (aka no mmap
nor malloc) would be both more readable and scale better on smp.
OG.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/