[OpenAFS-port-freebsd] Re: FreeBSD 5-current client work....

Garrett Wollman wollman@khavrinen.lcs.mit.edu
Thu, 25 Sep 2003 16:24:17 -0400 (EDT)


<<On Thu, 25 Sep 2003 15:59:39 -0400, Jim Rees <rees@umich.edu> said:

> Ultimately it would be a good thing if we could make the afs module
> independent of kernel options, so the same module could be used with any
> kernel, even if that can only be done for the non-debug version.  It would
> be even better if we could build the afs module without having a kernel
> build directory, just kernel sources.

I believe this is possible, for a limited range of libafs and kernel
option combinations, in the same way as it is possible for the
``official'' kernel modules.  It will require fixing some things and
some additional configuration support.

> So anything you can do to reduce the granularity of locking, and in
> particular switching to mutexes, is a good thing.  I just don't know
> how easy it's going to be.

Well, what I'm doing doesn't reduce the granularity at all -- it just
uses a more appropriate (and faster) synchronization primitive than
lockmgr().  I expect that even when Giant is gone from FreeBSD, AFS
will probably still need to have a whole-subsystem mutex -- there's
only so much one can do, and it's frankly a lot more portable that
way.  What I'm trying to do is really all about debugging: we have
great tools, like WITNESS, for debugging problems with mutexes, and
poor tools for debugging lockmgr() locks.

-GAWollman