Subject: Re: poolifying fileassoc
To: Brett Lymn <>
From: Chuck Silvers <>
List: tech-kern
Date: 10/05/2006 05:30:05
On Wed, Oct 04, 2006 at 09:33:59AM +0930, Brett Lymn wrote:
> On Wed, Oct 04, 2006 at 12:39:28AM +0900, YAMAMOTO Takashi wrote:
> > 
> > what's "vmlock"?
> > 
> Sorry, my bad for being vague, I mean that I get a panic saying that a
> simple lock is held if I have LOCKDEBUG defined.  This panic seems to
> be coming from malloc() when I try to use vfs_composefh_alloc() when I
> try to perform a per page check during uvn_getpages().  From what I
> can see this is not a bug - the LOCKDEBUG code is detecting something
> that should not be done in that context.  My thinking is that I need
> to have some preallocated resources to avoid performing a malloc in
> fileassoc_file_lookup(), to me using a pool looked like the correct
> thing to do.  I can then use this preallocated resource to provide
> storage to vfs_composefh() to fill in the file handle for me.  This
> storage is only required during the fileassoc_lookup_file() call so
> the number of preallocated structures should only need to be
> relatively small.

like I explained in earlier mail, page-checking stuff shouldn't be called
from getpages but rather from the aiodone code.  not only does that avoid
any problems like this but it also makes it easier to check pages only when
they're brought into memory the first time and not on later page-faults.