Subject: Re: kern/15364
To: None <chs@netbsd.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org>
From: Chuck Silvers <chuq@chuq.com>
List: netbsd-bugs
Date: 09/07/2005 16:28:02
The following reply was made to PR kern/15364; it has been noted by GNATS.

From: Chuck Silvers <chuq@chuq.com>
To: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
Cc: gnats-bugs@NetBSD.org
Subject: Re: kern/15364
Date: Wed, 7 Sep 2005 09:27:24 -0700

 On Sun, Sep 04, 2005 at 06:47:15PM +0900, YAMAMOTO Takashi wrote:
 > > On Wed, Aug 31, 2005 at 05:29:45AM +0900, YAMAMOTO Takashi wrote:
 > > > > could you give some details on how the pagedaemon would be confused by this?
 > > > 
 > > > pagedaemon frees the whole block when one of the corresponding pages
 > > > happens to be inactive.
 > > 
 > > could you explain how this happens?
 > > here's the code that sets PG_RELEASE or PG_PAGEOUT on a page.
 > > the marked lines skip setting those flags on pages in the cluster that
 > > are outside the original request.  this should prevent the problem you're
 > > describing, right?
 > 
 > > -->                     if (tpg->offset < startoff || tpg->offset >= endoff)
 > > -->                             continue;
 > 
 > for normal filesystems, right.
 > however, for softupdate, no.
 > as ffs_putpages expands the request, the "original request" here
 > is already expanded.
 > i have seen a system on which uvmexp.pdfreed is larger
 > than uvmexp.pdscans.
 
 ah, that makes sense.
 
 the patch that you sent earlier looks good, I'd just change the
 "multiple write resid" check into a KASSERT instead of UVMHIST_LOG.
 same for the "no page" panic.
 
 thanks,
 -Chuck