git: kernel -- vm_object locking: DEBUG_LOCKS check for hold_wait vs hold deadlock

Venkatesh Srinivas me at
Sun Mar 27 14:21:14 PDT 2011

On Sun, Mar 27, 2011 at 12:01:19PM -0700, Matthew Dillon wrote:
:    If a thread has a hold on a vm_object and enters hold_wait (via either
:    vm_object_terminate or vm_object_collapse), it will wait forever for the hold
:    count to hit 0. Record the threads holding an object in a per-object array.
   Hmm.  That's a bit iffy, it is possible for there to be more than 32
   holds on a VM object.
					Matthew Dillon
					<dillon at>
Agreed; this was something that was useful while debugging something locally,
but I kept it under DEBUG_LOCKS rather than INVARIANTS because it was not
generally safe. Would it be alright for me to drag bitstring.h into sys/ 
(where it is on FreeBSD at least) so that I can use that instead (and make
a growable bitvector)?

I thought this was okay, since DEBUG_LOCKS is not on by default; in the future
would you recommend not committing in stuff like this?
-- vs

More information about the Commits mailing list