tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: A small improvement for LOCKDEBUG



Andrew Doran <ad%netbsd.org@localhost> wrote:
> We a set of adaptive mutexes and rwlocks in the kernel that are subject to
> constraints that are not well documented. Some examples:

Which RW-locks exactly do you have in mind?

> ...
>
> We don't have good runtime checks to catch this. An idea that occured to me
> was to add a mutex type (and rwlock type) that says one must not sleep long
> term with the lock held. The type would only be of interest to the LOCKDEBUG
> code, which then watch out for ugly situations like the above.
> 
> Thoughts?

Been thinking about this a while ago too. Apart from catching very specific
deadlocks, it might be useful to "restrict" some locks to keep good response
times (eg. real time environment) and proper coding semantics. New mutex type
sounds like a right thing!

-- 
Best regards,
Mindaugas


Home | Main Index | Thread Index | Old Index