linux/fs/ext4
Darrick J. Wong 1d1d1a7672 mm: only enforce stable page writes if the backing device requires it
Create a helper function to check if a backing device requires stable
page writes and, if so, performs the necessary wait.  Then, make it so
that all points in the memory manager that handle making pages writable
use the helper function.  This should provide stable page write support
to most filesystems, while eliminating unnecessary waiting for devices
that don't require the feature.

Before this patchset, all filesystems would block, regardless of whether
or not it was necessary.  ext3 would wait, but still generate occasional
checksum errors.  The network filesystems were left to do their own
thing, so they'd wait too.

After this patchset, all the disk filesystems except ext3 and btrfs will
wait only if the hardware requires it.  ext3 (if necessary) snapshots
pages instead of blocking, and btrfs provides its own bdi so the mm will
never wait.  Network filesystems haven't been touched, so either they
provide their own stable page guarantees or they don't block at all.
The blocking behavior is back to what it was before 3.0 if you don't
have a disk requiring stable page writes.

Here's the result of using dbench to test latency on ext2:

3.8.0-rc3:
 Operation      Count    AvgLat    MaxLat
 ----------------------------------------
 WriteX        109347     0.028    59.817
 ReadX         347180     0.004     3.391
 Flush          15514    29.828   287.283

Throughput 57.429 MB/sec  4 clients  4 procs  max_latency=287.290 ms

3.8.0-rc3 + patches:
 WriteX        105556     0.029     4.273
 ReadX         335004     0.005     4.112
 Flush          14982    30.540   298.634

Throughput 55.4496 MB/sec  4 clients  4 procs  max_latency=298.650 ms

As you can see, the maximum write latency drops considerably with this
patch enabled.  The other filesystems (ext3/ext4/xfs/btrfs) behave
similarly, but see the cover letter for those results.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Acked-by: Steven Whitehouse <swhiteho@redhat.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Artem Bityutskiy <dedekind1@gmail.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Eric Van Hensbergen <ericvh@gmail.com>
Cc: Ron Minnich <rminnich@sandia.gov>
Cc: Latchesar Ionkov <lucho@ionkov.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-02-21 17:22:19 -08:00
..
acl.c
acl.h
balloc.c
bitmap.c
block_validity.c
dir.c lseek: the "whence" argument is called "whence" 2012-12-17 17:15:12 -08:00
ext4_extents.h
ext4_jbd2.c
ext4_jbd2.h
ext4.h There are two major features for this merge window. The first is 2012-12-16 17:33:01 -08:00
extents_status.c
extents_status.h
extents.c ext4: fix extent tree corruption caused by hole punch 2012-12-17 09:55:39 -05:00
file.c Various bug fixes for ext4. Perhaps the most serious bug fixed is one 2013-01-02 09:57:34 -08:00
fsync.c ext4: fix an incorrect comment about i_mutex 2012-12-25 13:31:52 -05:00
hash.c
ialloc.c ext4: enable ext4 inline support 2012-12-10 14:06:03 -05:00
indirect.c
inline.c ext4: zero out inline data using memset() instead of empty_zero_page 2012-12-11 03:31:49 -05:00
inode.c mm: only enforce stable page writes if the backing device requires it 2013-02-21 17:22:19 -08:00
ioctl.c
Kconfig ext4: fix configuration dependencies for ext4 ACLs and security labels 2013-01-06 23:38:44 -05:00
Makefile ext4: Remove CONFIG_EXT4_FS_XATTR 2012-12-10 16:30:43 -05:00
mballoc.c
mballoc.h
migrate.c
mmp.c
move_extent.c
namei.c ext4: remove duplicate call to ext4_bread() in ext4_init_new_dir() 2013-01-06 23:40:25 -05:00
page-io.c
resize.c
super.c ext4: lock i_mutex when truncating orphan inodes 2012-12-27 01:42:48 -05:00
symlink.c ext4: Remove CONFIG_EXT4_FS_XATTR 2012-12-10 16:30:43 -05:00
truncate.h
xattr_security.c
xattr_trusted.c
xattr_user.c
xattr.c ext4: zero out inline data using memset() instead of empty_zero_page 2012-12-11 03:31:49 -05:00
xattr.h ext4: zero out inline data using memset() instead of empty_zero_page 2012-12-11 03:31:49 -05:00