tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Modules loading modules?

On Sat Jul 31 2010 at 15:48:26 -0700, Paul Goyette wrote:
> >>If modload-from-modcmd is found necessary, sounds more like a case for
> >>the infamous recursive lock.
> >
> >Recursive lock is the way to go.  I think the same lock should also cover
> >all device configuration activites (i.e. autoconf) and any other
> >heavy lifting where we have chunks of the system coming and going.
> Well, folks, here is a first pass recursive locks!  The attached diffs 
> are against -current as of a few minutes ago.

Oh, heh, I thought we have recursive lock support.  But with that gone
from the vfs locks, I guess not (apart from the kernel lock ;).

I'm not sure if it's a good idea to change the size of kmutex_t.  I guess
plenty of data structures have carefully been adjusted by hand to its
size and I don't know of any automatic way to recalculate that stuff.

Even if not, since this is the only user and we probably won't have
that many of them even in the future, why not just define a new type
``rmutex'' which contains a kmutex, an owner and the counter?  It feels
wrong to punish all the normal kmutex users for just one use.  It'll also
make the implementation a lot simpler to test, since it's purely MI.

"separate normal case and worst case"

Home | Main Index | Thread Index | Old Index