Hello community, here is the log from the commit of package gnome-vfs2 checked in at Sun Feb 25 23:24:56 CET 2007. -------- --- GNOME/gnome-vfs2/gnome-vfs2.changes 2007-02-16 20:13:42.000000000 +0100 +++ /mounts/work_src_done/STABLE/gnome-vfs2/gnome-vfs2.changes 2007-02-24 00:12:32.187741000 +0100 @@ -1,0 +2,6 @@ +Sat Feb 24 00:11:13 CET 2007 - hpj@suse.de + +- Add patch to lessen the impact of poor fadvise() implementations. + Fixes Novell bug #224527. + +------------------------------------------------------------------- New: ---- gnome-vfs2-224527-slow-fadvise.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ gnome-vfs2.spec ++++++ --- /var/tmp/diff_new_pack.rO2822/_old 2007-02-25 23:24:12.000000000 +0100 +++ /var/tmp/diff_new_pack.rO2822/_new 2007-02-25 23:24:12.000000000 +0100 @@ -22,7 +22,7 @@ BuildRequires: mDNSResponder-devel %endif Version: 2.17.91 -Release: 1 +Release: 2 Summary: The GNOME 2.x Desktop Virtual File System Libraries License: GNU General Public License (GPL), GNU Library General Public License v. 2.0 and 2.1 (LGPL) Group: Development/Libraries/GNOME @@ -50,6 +50,7 @@ Patch34: gnome-vfs2-172870-unmount-uses-hal-udi-from-drive.diff Patch35: gnome-vfs2-172680-novell-services.diff Patch37: gnome-vfs2-183723-unix-mounts-plus-hal-mounts.diff +Patch38: gnome-vfs2-224527-slow-fadvise.patch Autoreqprov: on Obsoletes: gnome-vfs-extras Provides: gnome-vfs-extras @@ -169,6 +170,7 @@ # These patches have it's own translation management: %patch20 %patch22 +%patch38 # Generate translations for "news" and "ftp" entries from "h323". # These entries are identical with exception of URL type string. for po in po/*.po ; do @@ -260,6 +262,9 @@ %{_datadir}/gtk-doc/html/gnome-vfs-2.0 %changelog +* Sat Feb 24 2007 - hpj@suse.de +- Add patch to lessen the impact of poor fadvise() implementations. + Fixes Novell bug #224527. * Fri Feb 16 2007 - maw@suse.de - Update to 2.17.91 * Tue Feb 13 2007 - sbrabec@suse.cz ++++++ gnome-vfs2-224527-slow-fadvise.patch ++++++ --- libgnomevfs/gnome-vfs-xfer.c.old 2007-02-19 16:43:42.000000000 -0600 +++ libgnomevfs/gnome-vfs-xfer.c 2007-02-19 17:10:26.000000000 -0600 @@ -64,11 +64,10 @@ enum { DEFAULT_SIZE_OVERHEAD = 1024 }; -/* When the total copy size is over this limit, we try to - * forget the data cached for the files, in order to - * lower VM pressure - */ -#define DROP_CACHE_SIZE_LIMIT (20*1024*1024) +/* We forget at least this number of bytes at once, so as + * to not call fadvise() too often. It's slow on some file + * systems (e.g. XFS). */ +#define DROP_CACHE_BATCH_SIZE (512 * 1024) /* in asynch mode the progress callback does a context switch every time * it gets called. We'll only call it every now and then to not loose a @@ -1211,7 +1210,7 @@ copy_file_data (GnomeVFSHandle *target_h gpointer buffer; const char *write_buffer; GnomeVFSFileSize total_bytes_read; - gboolean forget_cache; + GnomeVFSFileSize last_cache_drop_point; guint block_size; *skip = FALSE; @@ -1223,10 +1222,8 @@ copy_file_data (GnomeVFSHandle *target_h block_size = MAX (source_block_size, target_block_size); buffer = g_malloc (block_size); total_bytes_read = 0; + last_cache_drop_point = 0; - /* Enable streaming if the total size is large */ - forget_cache = progress->progress_info->bytes_total >= DROP_CACHE_SIZE_LIMIT; - do { GnomeVFSFileSize bytes_read; GnomeVFSFileSize bytes_to_write; @@ -1243,10 +1240,6 @@ copy_file_data (GnomeVFSHandle *target_h result = gnome_vfs_read (source_handle, buffer, block_size, &bytes_read); - if (forget_cache) { - gnome_vfs_forget_cache (source_handle, - total_bytes_read, bytes_read); - } if (result != GNOME_VFS_OK && result != GNOME_VFS_ERROR_EOF) retry = handle_error (&result, progress, error_mode, skip); @@ -1277,9 +1270,16 @@ copy_file_data (GnomeVFSHandle *target_h write_buffer += bytes_written; } while ((result == GNOME_VFS_OK && bytes_to_write > 0) || retry); - if (forget_cache && bytes_to_write == 0) { + if (bytes_to_write == 0 && + total_bytes_read - last_cache_drop_point >= DROP_CACHE_BATCH_SIZE) { + gnome_vfs_forget_cache (source_handle, + last_cache_drop_point, + total_bytes_read - last_cache_drop_point); gnome_vfs_forget_cache (target_handle, - total_bytes_read - bytes_read, bytes_read); + last_cache_drop_point, + total_bytes_read - last_cache_drop_point); + + last_cache_drop_point = total_bytes_read; } progress->progress_info->phase = GNOME_VFS_XFER_PHASE_COPYING; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org