alistair23-linux/fs/ext3
Jan Kara 2299432e19 ext3: Speedup WB_SYNC_ALL pass
When doing filesystem wide sync, there's no need to force transaction
commit separately for each inode because ext3_sync_fs() takes care of
forcing commit at the end. Most of the time this slowness doesn't
manifest because previous WB_SYNC_NONE writeback doesn't leave much to
write but when there are processes aggressively creating new files and
several filesystems to sync, the sync slowness can be noticeable. In the
following test script sync(1) takes around 6 minutes when there are two
ext3 filesystems mounted on a standard SATA drive. After this patch sync
is about twice as fast in the default data=ordered mode. For
data=writeback mode we have even bigger speedup.

function run_writers
{
  for (( i = 0; i < 10; i++ )); do
    mkdir $1/dir$i
    for (( j = 0; j < 40000; j++ )); do
      dd if=/dev/zero of=$1/dir$i/$j bs=4k count=4 &>/dev/null
    done &
  done
}

for dir in "$@"; do
  run_writers $dir
done

sleep 40
time sync

Signed-off-by: Jan Kara <jack@suse.cz>
2014-03-12 22:48:02 +01:00
..
acl.c ext2/3/4: use generic posix ACL infrastructure 2014-01-25 23:58:19 -05:00
acl.h ext2/3/4: use generic posix ACL infrastructure 2014-01-25 23:58:19 -05:00
balloc.c ext3: remove an unneeded check in ext3_new_blocks() 2014-03-03 11:31:01 +01:00
bitmap.c ext3: use memweight() 2012-07-30 17:25:16 -07:00
dir.c fs: Mark function as static in ext3/dir.c 2014-03-03 11:30:59 +01:00
ext3.h Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs 2012-05-25 08:14:59 -07:00
ext3_jbd.c ext3: move headers to fs/ext3/ 2012-03-31 16:03:16 -04:00
file.c ext2/3/4: use generic posix ACL infrastructure 2014-01-25 23:58:19 -05:00
fsync.c ext3: Fix fsync error handling after filesystem abort. 2013-07-04 19:22:55 +02:00
hash.c ext3: return 32/64-bit dir name hash according to usage type 2012-05-15 23:34:39 +02:00
ialloc.c ext2/3: use prandom_u32() instead of get_random_bytes() 2014-03-04 12:19:03 +01:00
inode.c ext3: Speedup WB_SYNC_ALL pass 2014-03-12 22:48:02 +01:00
ioctl.c new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
Kconfig ext3: default to ordered mode 2010-07-23 12:50:55 +02:00
Makefile [PATCH] ext3: uninline large functions 2006-12-07 08:39:35 -08:00
namei.c ext2/3/4: use generic posix ACL infrastructure 2014-01-25 23:58:19 -05:00
namei.h ext3: ext3_bread usage audit 2012-10-09 23:21:42 +02:00
resize.c Ext3: return ENOMEM rather than EIO if sb_getblk fails 2013-01-21 11:19:57 +01:00
super.c ext3: Add __init macro to init_inodecache 2014-03-03 11:30:58 +01:00
symlink.c ext3: move headers to fs/ext3/ 2012-03-31 16:03:16 -04:00
xattr.c ext2/3/4: use generic posix ACL infrastructure 2014-01-25 23:58:19 -05:00
xattr.h ext2/3/4: use generic posix ACL infrastructure 2014-01-25 23:58:19 -05:00
xattr_security.c fs: Mark function as static in ext3/xattr_security.c 2014-03-03 11:31:00 +01:00
xattr_trusted.c ext3: move headers to fs/ext3/ 2012-03-31 16:03:16 -04:00
xattr_user.c ext3: move headers to fs/ext3/ 2012-03-31 16:03:16 -04:00