freebsd-src/sys
Poul-Henning Kamp 7a6b2b6429 Fix a long-standing deadlock issue with vnode backed md(4) devices:
On vnode backed md(4) devices over a certain, currently undetermined
size relative to the buffer cache our "lemming-syncer" can provoke
a buffer starvation which puts the md thread to sleep on wdrain.

This generally tends to grind the entire system to a stop because the
event that is supposed to wake up the thread will not happen until a fair
bit of the piled up I/O requests in the system finish, and since a lot
of those are on a md(4) vnode backed device which is currently waiting
on wdrain until a fair amount of the piled up ... you get the picture.

The cure is to issue all VOP_WRITES on the vnode backing the device
with IO_SYNC.

In addition to more closely emulating a real disk device with a
non-lying write-cache, this makes the writes exempt from rate-limited
(there to avoid starving the buffer cache) and consequently prevents
the deadlock.

Unfortunately performance takes a hit.

Add "async" option to give people who know what they are doing the
old behaviour.
2004-03-10 20:41:09 +00:00
..
alpha Retire pmap_pinit2(). Alpha was the last platform that used it. However, 2004-03-07 21:06:48 +00:00
amd64 Stop depending on #include pollution from cpufunc.h 2004-03-08 00:25:03 +00:00
arm Add sysentvec->sv_fixlimits() hook so that we can catch cases on 64 bit 2003-09-25 01:10:26 +00:00
boot Reset the text attributes when initializing the console. The EFI 2004-03-09 04:00:33 +00:00
cam Compare the *number* of patterns to zero, not the *pointer* to the 2004-02-28 12:59:56 +00:00
coda Device megapatch 5/6: 2004-02-21 21:32:15 +00:00
compat Fix several issues related to the KeInitializeTimer() etc... API stuff 2004-03-10 07:43:11 +00:00
conf Link pf to the build and install: 2004-03-08 22:03:29 +00:00
contrib Remove `$Name$' leftovers from the port version reporting. 2004-03-10 15:08:21 +00:00
crypto Fix a reentrancy issue in md5_calc(). 2004-01-27 18:57:21 +00:00
ddb Give DDB a "watchdog" command which disables all watchdogs. 2004-02-29 09:55:32 +00:00
dev Fix a long-standing deadlock issue with vnode backed md(4) devices: 2004-03-10 20:41:09 +00:00
fs Change __FUNCTION__ to __func__ 2004-03-03 07:43:34 +00:00
geom Rearrange some of the GEOM debugging tools to be more structured. 2004-03-10 08:49:08 +00:00
gnu Enforce the file size limit in VOP_WRITE() as well as VOP_TRUNCATE(); 2004-02-19 09:06:06 +00:00
i4b Device megapatch 4/6: 2004-02-21 21:10:55 +00:00
i386 - Make the acquisition of Giant in vm_fault_unwire() conditional on the 2004-03-10 04:44:43 +00:00
ia64 Retire pmap_pinit2(). Alpha was the last platform that used it. However, 2004-03-07 21:06:48 +00:00
isa Remove unused FDNUMTOUNIT() macro 2004-02-29 10:21:40 +00:00
isofs/cd9660 Fix comment containing vop_readdir_args contents: a_cookies is really 2004-02-23 01:43:00 +00:00
kern make sure we had the filedesc lock when calling fdinit when RFCFDG is set 2004-03-10 00:27:36 +00:00
libkern Remove register keyword and constify tmp values. This fixes 2004-02-12 03:23:13 +00:00
modules Link pf to the build and install: 2004-03-08 22:03:29 +00:00
net Fix handling of tap/vmnet flag in relation to cloning and properly enforce 2004-03-10 08:02:29 +00:00
net80211 Change WI_RID_SCAN_RES compatibility interface to return the result after 2004-01-19 05:25:43 +00:00
netatalk Rename dup_sockaddr() to sodupsockaddr() for consistency with other 2004-03-01 03:14:23 +00:00
netatm Don't remove the first mbuf in the chain if it got empty. 2004-02-21 12:55:07 +00:00
netgraph Add a netgraph node to handle ATM LLC encapsulation. This currently handles 2004-03-08 10:54:35 +00:00
netinet Lock down IP-layer encapsulation library: 2004-03-10 02:48:50 +00:00
netinet6 Move the AH algorithm list from a static local function variable to 2004-03-10 04:56:54 +00:00
netipsec Fix type in a sysctl. It used to be: net.key.prefered_oldsa 2004-02-16 17:09:53 +00:00
netipx Rename dup_sockaddr() to sodupsockaddr() for consistency with other 2004-03-01 03:14:23 +00:00
netkey avoid duplicate free. 2004-01-25 17:18:12 +00:00
netnatm Rename dup_sockaddr() to sodupsockaddr() for consistency with other 2004-03-01 03:14:23 +00:00
netncp Split the mlock() kernel code into two parts, mlock(), which unpacks 2004-02-26 00:27:04 +00:00
netsmb Rename dup_sockaddr() to sodupsockaddr() for consistency with other 2004-03-01 03:14:23 +00:00
nfs University of Michigan's Citi NFSv4 kernel client code. 2003-11-14 20:54:10 +00:00
nfs4client kthread_exit() no longer requires Giant, so don't force callers to acquire 2004-03-05 22:42:17 +00:00
nfsclient Rename dup_sockaddr() to sodupsockaddr() for consistency with other 2004-03-01 03:14:23 +00:00
nfsserver Convert from timeout to callout API. 2004-03-07 16:28:31 +00:00
opencrypto kthread_exit() no longer requires Giant, so don't force callers to acquire 2004-03-05 22:42:17 +00:00
pc98 Restore CDIOCREADAUDIO ioctl. 2004-03-07 14:16:42 +00:00
pccard Device megapatch 4/6: 2004-02-21 21:10:55 +00:00
pci Device megapatch 4/6: 2004-02-21 21:10:55 +00:00
posix4 The sem_timedwait() and ksem_timedwait() functions both 2004-02-03 22:27:03 +00:00
powerpc Retire pmap_pinit2(). Alpha was the last platform that used it. However, 2004-03-07 21:06:48 +00:00
rpc Convert from timeout to callout API. 2004-03-07 16:23:03 +00:00
security Define BPFD_LOCK_ASSERT() to assert the BPF descriptor lock. 2004-02-29 15:33:56 +00:00
sparc64 Change time_t from a 32-bit value to a 64-bit value, on FreeBSD/sparc64 2004-03-10 17:39:05 +00:00
sys Fix a long-standing deadlock issue with vnode backed md(4) devices: 2004-03-10 20:41:09 +00:00
tools Attempt to clean up the emu10k1-alsa.h stuff so that config doesn't 2004-02-05 22:51:16 +00:00
ufs A more accurate test in the new ufs_lock than that in 1.235. 2004-02-23 19:05:05 +00:00
vm - Make the acquisition of Giant in vm_fault_unwire() conditional on the 2004-03-10 04:44:43 +00:00
Makefile Replaced outdated comment. 2004-01-17 03:28:27 +00:00