freebsd-nq/sys/fs/ext2fs
Konstantin Belousov c480f781ea Current implementations of sync(2) and syncer vnode fsync() VOP uses
mnt_noasync counter to temporary remove MNTK_ASYNC mount option, which
is needed to guarantee a synchronous completion of the initiated i/o
before syscall or VOP return.  Global removal of MNTK_ASYNC option is
harmful because not only i/o started from corresponding thread becomes
synchronous, but all i/o is synchronous on the filesystem which is
initiated during sync(2) or syncer activity.

Instead of removing MNTK_ASYNC from mnt_kern_flag, provide a local
thread flag to disable async i/o for current thread only. Use the
opportunity to move DOINGASYNC() macro into sys/vnode.h and
consistently use it through places which tested for MNTK_ASYNC.

Some testing demonstrated 60-70% improvements in run time for the
metadata-intensive operations on async-mounted UFS volumes, but still
with great deviation due to other reasons.

Reviewed by:	mckusick
Tested by:	scottl
MFC after:	2 weeks
2012-02-06 11:04:36 +00:00
..
ext2_alloc.c Migrate ufs and ext2fs from skpc() to memcchr(). 2012-01-01 20:47:33 +00:00
ext2_balloc.c Style cleanups by jh@. 2011-12-16 15:47:43 +00:00
ext2_bmap.c Style cleanups by jh@. 2011-12-16 15:47:43 +00:00
ext2_dinode.h Various style fixes including using uint*_t instead of u_int*_t. 2011-04-27 18:15:34 +00:00
ext2_dir.h Various style fixes including using uint*_t instead of u_int*_t. 2011-04-27 18:15:34 +00:00
ext2_extern.h Bring in reallocblk to ext2fs. 2011-12-15 20:31:18 +00:00
ext2_inode_cnv.c
ext2_inode.c Style cleanups by jh@. 2011-12-16 15:47:43 +00:00
ext2_lookup.c Style cleanups by jh@. 2011-12-16 15:47:43 +00:00
ext2_mount.h Some cosmetic fixes and remove a duplicate constant. 2011-02-01 18:30:52 +00:00
ext2_subr.c Bring in reallocblk to ext2fs. 2011-12-15 20:31:18 +00:00
ext2_vfsops.c Style cleanups by jh@. 2011-12-16 15:47:43 +00:00
ext2_vnops.c Style cleanups by jh@. 2011-12-16 15:47:43 +00:00
ext2fs.h Style cleanups by jh@. 2011-12-16 15:47:43 +00:00
fs.h Style cleanups by jh@. 2011-12-16 15:47:43 +00:00
inode.h Current implementations of sync(2) and syncer vnode fsync() VOP uses 2012-02-06 11:04:36 +00:00