Subject: Re: PR/34293 CVS commit: src/sys/dev
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
List: netbsd-bugs
Date: 09/04/2006 00:30:03
The following reply was made to PR kern/34293; it has been noted by GNATS.

From: yamt@mwd.biglobe.ne.jp (YAMAMOTO Takashi)
To: mlelstv@serpens.de
Cc: gnats-bugs@NetBSD.org, kern-bug-people@NetBSD.org,
	gnats-admin@NetBSD.org, netbsd-bugs@NetBSD.org
Subject: Re: PR/34293 CVS commit: src/sys/dev
Date: Mon,  4 Sep 2006 09:26:22 +0900 (JST)

 > >  it's not correct to tsleep() in a strategy routine, which may be called from
 > >  interrupt context.
 > 
 > vndstrategy isn't called from interrupt context.
 
 yes, it is.
 please read the thread referred in the commit message.
 
 > But if that is
 > a problem, the feedback loop can be put into both vndread()/vndwrite().
 
 why is it enough?
 
 > >  I suspect
 > >  throttling the caller in vnd only hides the problem;
 > 
 > No, it prevents the problem. The writer needs to be throttled to
 > not overwhelm the consumer because in this case it just eats up
 > all memory. That necessary feedback loop is created by the patch.
 
 can you explain how it prevents the problem while vndthread() already has
 the same check?
 
 while vndthread is working on behalf of the pagedaemon here,
 it is not a pagedaemon.  so it can't get special treatment for pagedaemon
 from buffer cache etc and can deadlock.
 
 YAMAMOTO Takashi