summaryrefslogtreecommitdiffstats
path: root/sys/ufs
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2012-02-06 11:04:36 +0000
committerkib <kib@FreeBSD.org>2012-02-06 11:04:36 +0000
commit52c17430bc70cd8c1e6dc2ff5c7786cc3f4871e4 (patch)
treefae5558858b305702b78be385893645701a55d02 /sys/ufs
parent8b885b79f5441a9ccaf7101ad3dab74016626fe6 (diff)
downloadFreeBSD-src-52c17430bc70cd8c1e6dc2ff5c7786cc3f4871e4.zip
FreeBSD-src-52c17430bc70cd8c1e6dc2ff5c7786cc3f4871e4.tar.gz
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
Diffstat (limited to 'sys/ufs')
-rw-r--r--sys/ufs/ufs/inode.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/sys/ufs/ufs/inode.h b/sys/ufs/ufs/inode.h
index 6f3d6f9..3519ca2 100644
--- a/sys/ufs/ufs/inode.h
+++ b/sys/ufs/ufs/inode.h
@@ -176,7 +176,6 @@ struct indir {
/* Determine if soft dependencies are being done */
#define DOINGSOFTDEP(vp) ((vp)->v_mount->mnt_flag & (MNT_SOFTDEP | MNT_SUJ))
#define MOUNTEDSOFTDEP(mp) ((mp)->mnt_flag & (MNT_SOFTDEP | MNT_SUJ))
-#define DOINGASYNC(vp) ((vp)->v_mount->mnt_kern_flag & MNTK_ASYNC)
#define DOINGSUJ(vp) ((vp)->v_mount->mnt_flag & MNT_SUJ)
#define MOUNTEDSUJ(mp) ((mp)->mnt_flag & MNT_SUJ)
OpenPOWER on IntegriCloud