Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Jul 1995 09:21:49 -0700 (PDT)
From:      John Dyson <dyson>
To:        dfr@render.com (Doug Rabson)
Cc:        dillon@blob.best.net, bugs@freebsd.org
Subject:   Re: brelse() panic in nfs_read()/nfs_bioread()
Message-ID:  <199507241621.JAA25708@freefall.cdrom.com>
In-Reply-To: <Pine.BSF.3.91.950724170846.12542L-100000@minnow.render.com> from "Doug Rabson" at Jul 24, 95 05:13:35 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> The sequence of events in nfs_bioread is more-or-less:
> 
> 	vfs_busy_pages(bp, 0);
> 	<read data into buffer>
> 	biodone(bp);		/* called from nfs_doio */
> 	...
> 	uiomove(...);
> 	...
> 	brelse(bp);
> 
> Is it possible that the pages can be reclaimed between the biodone(bp) 
> and the brelse(bp).  The buffer is still busy, so another getblk will 
> wait until the release but the pages are 'unbusied' in biodone.  If a 
> sleep happens in uiomove as a result of a pagefault, then perhaps the VM 
> system snatches the pages away then.
> 
> One could fix this by surrounding the uiomove with calls to 
> vfs_busy_pages and vfs_unbusy_pages.  There must be a better way though.

If the pages are resident in a buffer (even if replaced by a bogus page),
they should be bmapped and immune from the dastardly deeds of the
rest of the VM system (I hope).

John
dyson@root.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199507241621.JAA25708>