bug-coreutils
[Top][All Lists]
Advanced

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

use of posix_fadvise/posix_fallocate


From: Eric Blake
Subject: use of posix_fadvise/posix_fallocate
Date: Mon, 20 Nov 2006 06:26:00 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.8) Gecko/20061025 Thunderbird/1.5.0.8 Mnenhy/0.7.4.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

A complaint was recently raised on the cygwin list that the current cp
algorithm for regular files leads to disk fragmentation, since files are
only copied a block at a time.  In response, the cygwin developers
implemented both posix_fadvise and posix_fallocate.  Would it be worth
trying to write a gnulib module that provides substitutions for these
functions on lacking platforms (posix_fadvise being a no-op, and
posix_fallocate resolving to a call to ftruncate), then trying to improve
the copy algorithm in copy_reg() to inform the kernel that the source file
is read-once (POSIX_FADV_SEQUENTIAL, POSIX_FADV_NOREUSE), and that the
destination file is expected to occupy the same length as the source, so
that the resulting copy is potentially faster and less likely to be
fragmented on disk?

- --
Life is short - so eat dessert first!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFYazo84KuGfSFAYARAjJSAJ9xxe0qYjqEnpQchQaTXtspPOVgBQCgzKPa
hSpWti8tonLWM718VfTAKFo=
=lE4I
-----END PGP SIGNATURE-----




reply via email to

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