From owner-cvs-all@FreeBSD.ORG Wed Mar 10 20:46:53 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F140016A4CE; Wed, 10 Mar 2004 20:46:53 -0800 (PST) Received: from mx.nsu.ru (mx.nsu.ru [212.192.164.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id 80A4143D39; Wed, 10 Mar 2004 20:46:53 -0800 (PST) (envelope-from danfe@regency.nsu.ru) Received: from regency.nsu.ru ([193.124.210.26]) by mx.nsu.ru with esmtp (Exim 4.30) id 1B1I9e-0003tx-GJ; Thu, 11 Mar 2004 10:50:46 +0600 Received: from regency.nsu.ru (localhost [127.0.0.1]) by regency.nsu.ru (8.12.10/8.12.10) with ESMTP id i2B4lM2a096084; Thu, 11 Mar 2004 10:47:22 +0600 (NOVT) (envelope-from danfe@regency.nsu.ru) Received: (from danfe@localhost) by regency.nsu.ru (8.12.10/8.12.10/Submit) id i2B4lMja096075; Thu, 11 Mar 2004 10:47:22 +0600 (NOVT) (envelope-from danfe) Date: Thu, 11 Mar 2004 10:47:22 +0600 From: Alexey Dokuchaev To: Poul-Henning Kamp Message-ID: <20040311044722.GA93643@regency.nsu.ru> References: <200403102041.i2AKf90l061660@repoman.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200403102041.i2AKf90l061660@repoman.freebsd.org> User-Agent: Mutt/1.4.1i cc: cvs-src@freebsd.org cc: src-committers@freebsd.org cc: cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/sys mdioctl.h src/sys/dev/md md.c src/sbin/mdconfig mdconfig.8 mdconfig.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Mar 2004 04:46:54 -0000 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