Re: [RFC] Change locking in block_dev.c:do_open()

From: David C. Hansen (
Date: Wed Dec 12 2001 - 21:33:34 EST

Ryan Cumming wrote:
> On December 12, 2001 16:39, David C. Hansen wrote:
> > We can add a semaphore which must be acquired before a module can be
> > unloaded, and hold it over the area where the module must not be
> > unloaded. We could replace the unload_lock spinlock with a semaphore,
> > which I'll call it unload_sem here. It would look something like this:
> Why not use a read-write semaphore? The sections that require the module to
> stay resident use a read lock, and module unloading aquires a write lock. In
> addition to containing the evil, evil BKL, you might actually get a tangiable
> scalability gain out of it.
Cool idea. I'll do that. Now that we have those locking primitives in
the kernel I wish that we used them more often.

David C. Hansen
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Sat Dec 15 2001 - 21:00:24 EST