Subject: newlock
To: None <>
From: Andrew Doran <>
List: tech-kern
Date: 09/02/2006 16:22:15
Hi all,

Thorpe added a few years back. I'd appreciate some constructive review
draft manual pages for the primatives here:

These would be used to replace splfoo()/simple_lock(), spinlockmgr()
and outside of VFS, lockmgr().

basically boil down to at most splraiseipl()/splx(). The adaptive locks
remain, however. I don't see that as a big problem: if an architecture
implements the basic lock stubs, the common case of acquiring or releasing
a lock is cheap: perhaps 10 or so instructions. For an example of memory
usage, on i386 a mutex is 4 bytes and a RW lock is 16 bytes.

The *_high() variants are a special case for the guts of the kernel where
we need to release spin locks out of order. They aren't pretty, and I'm
not sure if they should be documented for device drivers.