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
..
2003-09-08 08:30:43 +00:00
2003-05-31 16:54:37 +00:00
2004-02-21 21:57:26 +00:00
2003-12-31 22:27:51 +00:00
2003-05-01 14:40:16 +00:00
2003-06-22 08:41:43 +00:00
2002-11-05 17:51:56 +00:00
2003-12-24 00:51:30 +00:00
2004-02-21 21:57:26 +00:00
2003-02-13 17:47:44 +00:00
2003-08-19 16:41:12 +00:00
2003-02-21 16:24:49 +00:00
2002-07-10 04:47:25 +00:00
2003-02-12 07:00:59 +00:00
2003-05-22 17:07:57 +00:00
2004-02-03 05:11:31 +00:00
2003-09-10 19:08:16 +00:00
2004-02-27 16:14:27 +00:00