coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using sendfile in cp since Linux 2.6.33


From: Bob Proulx
Subject: Re: Using sendfile in cp since Linux 2.6.33
Date: Mon, 8 Oct 2012 12:25:04 -0600
User-agent: Mutt/1.5.21 (2010-09-15)

Ivan Korotkov wrote:
> this is an enhancement proposal to use sendfile instead of read/write loop
> in cp(1) on Linux 2.6.33 and above to speed up copying. WDYT?

The feature is very new.  It think it is too new to use in a coreutils
command like cp.  For anyone who uses a single binary on multiple
different kernels (not that uncommon) this could cause the program to
use the new sendfile(2) api on the older kernel which does not support
it causing pain to those users.  In order to use it the program would
need to dynamically determine at runtime if the feature was available
and only use it then.  That adds too much complexity for a simple
program like cp should be.

Do you have any benchmarks which would show what type of performance
improvement can be expected of a change from read(2)-write(2) to
sendfile(2) between descriptors?  Benchmark data would be most useful
in determining the worth of such feature changes.

Bob




reply via email to

[Prev in Thread] Current Thread [Next in Thread]