cvs commit: src/sys/sys mdioctl.h src/sys/dev/md md.c src/sbin/mdconfig mdconfig.8 mdconfig.c

Alexey Dokuchaev danfe at nsu.ru
Wed Mar 10 20:46:54 PST 2004


On Wed, Mar 10, 2004 at 12:41:09PM -0800, Poul-Henning Kamp wrote:
> phk         2004/03/10 12:41:09 PST
> 
>   FreeBSD src repository
> 
>   Modified files:
>     sys/sys              mdioctl.h 
>     sys/dev/md           md.c 
>     sbin/mdconfig        mdconfig.8 mdconfig.c 
>   Log:
>   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.

Just out of curiosity, is your fix a real fix, or just a clever
workaround?  Meaning, there are some very in-depth issues involved that
prevent this problem from being fixed without performance penalty?

Thanks.

./danfe


More information about the cvs-src mailing list