Subject: Re: auto-spl simple locks
To: Chuck Silvers <>
From: Jason Thorpe <>
List: tech-kern
Date: 07/30/1999 08:32:42
On Fri, 30 Jul 1999 08:15:54 -0700 
 Chuck Silvers <> wrote:

 > ok, so what's this pmap problem?

When you're holding the kernel pmap's lock, you must go to splimp(),
otherwise, an interrupt could cause you to deadlock.

 > storing the old spl level in the lock like this adds the constraint that
 > locks must be released in the reverse order of that in which they were
 > acquired.  it also requires either that the spl level used for a lock be
 > greater than or equal to the spl level used for any locks aquired before
 > it, or that splraise() semantics be used for all levels in cpu_lock_spl().
 > if we conclude that these constraints are acceptable, they should be
 > enforced by LOCKDEBUG.

Hrm.  Yes, you're correct.  Ok, so I'm becoming inclined to abandon this
approach, and just add the spl*() calls explicitly, as appropriate.

        -- Jason R. Thorpe <>