The Big Kernel Lock lives on
Posted May 27, 2004 11:54 UTC (Thu) by
corbet (editor, #1)
In reply to:
The Big Kernel Lock lives on by ncm
Parent article:
The Big Kernel Lock lives on
The BKL is a special lock; its purpose still, essentially, is to protect resources not covered by some other lock. Modern code running under the BKL may well take other locks, but it will be unaware of it - the locks will be taken further down the call chain. Once the code itself becomes lock-aware, the need for the BKL should go away.
And yes, it is actually quite important to define the order in which locks are taken. If the same two locks can be taken in either order, the system will eventually deadlock. Lock ordering rules (and, in general, figuring out which locks you need) get to be a real problem as the number of locks grows; people like Larry McVoy have been warning for years that overly fine-grained locking leads to an unmaintainable kernel.
(
Log in to post comments)