Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Aug 2011 19:46:22 +0300
From:      Andriy Gapon <avg@FreeBSD.org>
To:        Warner Losh <imp@bsdimp.com>
Cc:        Hans Petter Selasky <hselasky@FreeBSD.org>, John Baldwin <jhb@FreeBSD.org>, freebsd-arch@FreeBSD.org
Subject:   Re: skipping locks, mutex_owned, usb
Message-ID:  <4E5E655E.8060505@FreeBSD.org>
In-Reply-To: <DD9206EC-A969-434A-ABC5-15B2857C571C@bsdimp.com>
References:  <4E53986B.5000804@FreeBSD.org> <4E5A099F.4060903@FreeBSD.org> <201108281127.44696.hselasky@freebsd.org> <201108310943.24476.jhb@freebsd.org> <4E5E5DA0.4060003@FreeBSD.org> <DD9206EC-A969-434A-ABC5-15B2857C571C@bsdimp.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4E5E655E.8060505>