skipping locks, mutex_owned, usb

Andriy Gapon avg at FreeBSD.org
Wed Aug 31 16:46:29 UTC 2011


on 31/08/2011 19:32 Warner Losh said the following:
> 
> On Aug 31, 2011, at 10:13 AM, Andriy Gapon wrote:
>> So why the mutex unwinding/rewinding code is present at all?
>> What kind of situations is it supposed to prevent?
>>
>> Personally I think that we either know that those drivers should not hold the
>> locks in question (bus_mtx and xfer_mtx) or we know that they hold them.
>> I do not see why we have to be conditional here or have a loop even...
> 
> Today, I think we know these things.  In the past, as the code was written, there was a lot more special case code needed for giant cohabitation.

Since you chimed in... :-)
I have a hard time imagining a situation where that code is useful today or was
useful before.
Any example, purely hypothetical even, would do.


-- 
Andriy Gapon


More information about the freebsd-arch mailing list