Re: File copy system call proposal

Quinn Harris (quinn@nmt.edu)
08 Dec 2001 21:56:25 -0700


On Sat, 2001-12-08 at 17:19, H. Peter Anvin wrote:
>
> One thing that one could do for an in-kernel copy is to extend
> sendfile() to support any kind of file descriptor. That'd be a very
> clean way to do it.
>

I think the best thing would be to extend generic_file_write
(mm/filemap.c) to recognize if its writing a complete page to disk in
which case it will not duplicate that page. (Issues with getting the
buffer cache to support this remain.) This should make either the
mmap/write or sendfile aproach be zero-copy. I am given the impression
that this is just what the TCP/IP version of write does to make it
zero-copy.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/