freebsd-dev/sys
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
..
amd64 Add "nodevice adw" to WITHOUT_SOURCELESS_UCODE. 2012-02-04 13:45:39 +00:00
arm Add C11 macros describing subnormal numbers to float.h. 2012-01-23 06:36:41 +00:00
boot Fix clang warnings. 2012-02-05 20:00:39 +00:00
bsm
cam Insert ordered command every 1/4 of the current command timeout, not 1/4 2012-02-02 19:02:15 +00:00
cddl Revert r230913 and r230914. 2012-02-03 13:40:51 +00:00
compat Add 32-bit compat code for AIO kevent flags introduced in revision 230857. 2012-02-05 04:49:31 +00:00
conf After multiple requests for back out, after multiple promisses from adrian@ 2012-02-04 20:17:07 +00:00
contrib Allocate our mbuf with m_get2(). 2012-01-17 12:14:26 +00:00
crypto Add support for the extended FPU states on amd64, both for native 2012-01-21 17:45:27 +00:00
ddb Use strchr() and strrchr(). 2012-01-02 12:12:10 +00:00
dev Remove extra semicolon. 2012-02-05 16:41:06 +00:00
fs Current implementations of sync(2) and syncer vnode fsync() VOP uses 2012-02-06 11:04:36 +00:00
gdb kern cons: introduce infrastructure for console grabbing by kernel 2011-12-17 15:08:43 +00:00
geom Current implementations of sync(2) and syncer vnode fsync() VOP uses 2012-02-06 11:04:36 +00:00
gnu/fs Use new OSS-based BSD-licensed header for cs sound driver. 2012-02-01 21:38:01 +00:00
i386 Add "nodevice adw" to WITHOUT_SOURCELESS_UCODE. 2012-02-04 13:45:39 +00:00
ia64 Add C11 macros describing subnormal numbers to float.h. 2012-01-23 06:36:41 +00:00
isa - There's no need to overwrite the default device method with the default 2011-11-22 21:28:20 +00:00
kern Current implementations of sync(2) and syncer vnode fsync() VOP uses 2012-02-06 11:04:36 +00:00
kgssapi Add missing break statement to make sure all 3DES etypes really are treated 2011-10-10 09:13:07 +00:00
libkern Implement extensions on top of standards instead of the other way around. 2012-01-03 07:05:30 +00:00
mips Add C11 macros describing subnormal numbers to float.h. 2012-01-23 06:36:41 +00:00
modules Add exca to powerpc modules build as a dependency for cbb. 2012-02-05 13:29:01 +00:00
net Fix typo in r231010. 2012-02-05 12:52:28 +00:00
net80211 Update the mesh reason codes to match the latest 802.11s specification. 2012-02-06 00:26:29 +00:00
netatalk Convert all users of IF_ADDR_LOCK to use new locking macros that specify 2012-01-05 19:00:36 +00:00
netgraph Provide a findhook method for ng_socket(4). The node stores a 2012-01-23 16:43:13 +00:00
netinet Fix a typo which was already fixed by eadler in r227489. We missed 2012-02-06 10:47:12 +00:00
netinet6 Remove casts from inet6 address testing macros, thus preserving 2012-01-26 12:04:19 +00:00
netipsec Clean up some #endif comments removing from short sections. Add #endif 2012-01-22 02:13:19 +00:00
netipx Convert all users of IF_ADDR_LOCK to use new locking macros that specify 2012-01-05 19:00:36 +00:00
netnatm
netncp Change ncp_scan_bindery_object() to pass a constant search string. 2011-10-16 08:44:03 +00:00
netsmb Add unicode support to msdosfs and smbfs; original pathes from imura, 2011-11-18 03:05:20 +00:00
nfs Some cleanup of BOOTP code. Initially I wanted to just change the ifioctl() 2011-12-13 07:02:48 +00:00
nfsclient Current implementations of sync(2) and syncer vnode fsync() VOP uses 2012-02-06 11:04:36 +00:00
nfsserver Honor NFSv3 commit call (RFC 1813, Section 3.3.21) where when count is 0, 2011-12-15 02:26:53 +00:00
nlm jwd@ reported a problem via email to freebsd-fs@ on Aug 25, 2011 2012-01-31 02:11:05 +00:00
ofed Remove spurious 8bit chars, turning files into plain ASCII. 2012-01-15 13:23:54 +00:00
opencrypto
pc98 Add support for the extended FPU states on amd64, both for native 2012-01-21 17:45:27 +00:00
pci To save more power, switch to 10/100Mbps link when controller is 2011-11-23 23:29:18 +00:00
powerpc Inherit from PCI bridge driver instead of manually specifying all of its 2012-02-05 20:07:45 +00:00
rpc Both a crash reported on freebsd-current on Oct. 18 under the 2011-11-03 14:38:03 +00:00
security Use strchr() and strrchr(). 2012-01-02 12:12:10 +00:00
sparc64 As it turns out r227960 may still be insufficient with PREEMPTION 2012-01-28 22:42:33 +00:00
sys Current implementations of sync(2) and syncer vnode fsync() VOP uses 2012-02-06 11:04:36 +00:00
teken Link the demo application against ncursesw to make Unicode work. 2011-10-13 14:20:27 +00:00
tools Restore the comment that I removed by accident. 2011-11-09 13:26:59 +00:00
ufs Current implementations of sync(2) and syncer vnode fsync() VOP uses 2012-02-06 11:04:36 +00:00
vm Fix NULL dereference panic on attempt to turn off (on system shutdown) 2012-02-01 20:12:44 +00:00
x86 Fix a few bugs in the SRAT parsing code: 2012-01-03 20:53:58 +00:00
xdr
xen Add the GSO prefix descriptor define. 2012-02-01 20:19:33 +00:00
Makefile Improve the cscope target's handling of MD directories. Automatically 2012-01-03 17:31:27 +00:00