Re: File copy system call proposal

Ton Hospel (linux-kernel@ton.iguana.be)
Sat, 8 Dec 2001 23:11:13 +0000 (UTC)


In article <1007839431.371.0.camel@quinn.rcn.nmt.edu>,
Quinn Harris <quinn@nmt.edu> writes:
> I wasn't aware of the sendfile system call. But it apears that just
> like the mmap, write method suggested by H. Peter Anvin a memory copy is
> still performed when copying files from discs to duplicate the data for
> the buffer cache. This would undoubtedly be faster than repeatedly
> calling read and write as it avoids one mem copy. Yet GNU
> fileutils-4.1, that cp and install are part of, uses the read/write
> method. I expect this is primarily because of portability issues but I
> wouldn't think the use of mmap would cause portability issues.

It does in fact. On some systems locks and mmaps are mutually exclusive.
-
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/