alistair23-linux/fs/ext3
Hisashi Hifumi 3d61f75eef ext3: fdatasync should skip metadata writeout when overwriting
Currently fdatasync is identical to fsync in ext3.

I think fdatasync should skip journal flush in data=ordered and
data=writeback mode when it overwrites to already-instantiated blocks on
HDD.  When I_DIRTY_DATASYNC flag is not set, fdatasync should skip journal
writeout because this indicates only atime or/and mtime updates.

Following patch is the same approach of ext2's fsync code(ext2_sync_file).

I did a performance test using the sysbench.

#sysbench --num-threads=128 --max-requests=50000 --test=fileio --file-total-size=128G
--file-test-mode=rndwr --file-fsync-mode=fdatasync run

The result on ext3 was:

	-2.6.24
	Operations performed:  0 Read, 50080 Write, 59600 Other = 109680 Total
	Read 0b  Written 782.5Mb  Total transferred 782.5Mb  (12.116Mb/sec)
	  775.45 Requests/sec executed

	Test execution summary:
	    total time:                          64.5814s
	    total number of events:              50080
	    total time taken by event execution: 3713.9836
	    per-request statistics:
	         min:                            0.0000s
	         avg:                            0.0742s
	         max:                            0.9375s
	         approx.  95 percentile:         0.2901s

	Threads fairness:
	    events (avg/stddev):           391.2500/23.26
	    execution time (avg/stddev):   29.0155/1.99

	-2.6.24-patched
	Operations performed:  0 Read, 50009 Write, 61596 Other = 111605 Total
	Read 0b  Written 781.39Mb  Total transferred 781.39Mb  (16.419Mb/sec)
	1050.83 Requests/sec executed

	Test execution summary:
	    total time:                          47.5900s
	    total number of events:              50009
	    total time taken by event execution: 2934.5768
	    per-request statistics:
 	         min:                            0.0000s
	         avg:                            0.0587s
 	         max:                            0.8938s
	         approx.  95 percentile:         0.1993s

	Threads fairness:
	    events (avg/stddev):           390.6953/22.64
	    execution time (avg/stddev):   22.9264/1.17

Filesystem I/O throughput was improved.

Signed-off-by :Hisashi Hifumi <hifumi.hisashi@oss.ntt.co.jp>
Acked-by: Jan Kara <jack@suse.cz>
Cc: <linux-ext4@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-28 08:58:43 -07:00
..
acl.c ext3: fix wrong gfp type under transaction 2008-03-19 18:53:36 -07:00
acl.h
balloc.c ext3: replace all adds to little endians variables with le*_add_cpu 2008-02-08 09:22:32 -08:00
bitmap.c fs: mark nibblemap const 2007-10-17 08:42:47 -07:00
dir.c Fix 64KB blocksize in ext3 directories 2007-11-14 18:45:43 -08:00
ext3_jbd.c
file.c
fsync.c ext3: fdatasync should skip metadata writeout when overwriting 2008-04-28 08:58:43 -07:00
hash.c
ialloc.c ext*: spelling fix prefered -> preferred 2008-04-21 22:45:55 +00:00
inode.c ext*: spelling fix prefered -> preferred 2008-04-21 22:45:55 +00:00
ioctl.c [PATCH] r/o bind mounts: elevate write count for ioctls() 2008-04-19 00:29:24 -04:00
Makefile
namei.c iget: stop EXT3 from using iget() and read_inode() 2008-02-07 08:42:27 -08:00
namei.h
resize.c ext3: fix wrong gfp type under transaction 2008-03-19 18:53:36 -07:00
super.c quota: ext3: make ext3 handle quotaon on remount 2008-04-28 08:58:33 -07:00
symlink.c
xattr.c vfs: fix possible deadlock in ext2, ext3, ext4 when using xattrs 2008-04-15 19:35:41 -07:00
xattr.h
xattr_security.c
xattr_trusted.c
xattr_user.c