Subject: Re: poolifying fileassoc
To: YAMAMOTO Takashi <>
From: Brett Lymn <>
List: tech-kern
Date: 10/04/2006 12:30:25
On Wed, Oct 04, 2006 at 11:42:40AM +0900, YAMAMOTO Takashi wrote:
> iirc, what you want to do is something about unreliable backing store, right?
> i doubt if you really need to call fileassoc with spin locks held
> because, in general, i/o from/to backing store can't be done with
> spin locks held.


> how do you know how much preallocation is needed?

The honest answer is that I don't know exactly but my thinking is that
since our kernel is not multithreaded that there really can only be
one of these calls being processed per CPU at any one time (worst
case) so I would estimate the preallocation as being one fhandle per
cpu plus some extras "just in case".  I would have liked to
automatically size the pool based on the number of CPUs in the system
but I couldn't find anywhere where we keep the number of cpu's the
system knows about - when I checked i386 there appeared to be a bit
map of cpus but it didn't look very useful.

Brett Lymn