[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CANN689EscUK7_ZaiUbCdt5K-=PYPFgVdeE_GFem0A7WZVfQH-A@mail.gmail.com>
Date: Sat, 22 Aug 2020 10:30:34 -0700
From: Michel Lespinasse <walken@...gle.com>
To: Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>, Will Deacon <will@...nel.org>,
Davidlohr Bueso <dave@...olabs.net>
Cc: LKML <linux-kernel@...r.kernel.org>
Subject: Re: Lockdep question regarding two-level locks
On Sat, Aug 22, 2020 at 9:04 AM Michel Lespinasse <walken@...gle.com> wrote:
> - B's implementation could, when lockdep is enabled, always release
> lock A before acquiring lock B. This is not ideal though, since this
> would hinder testing of the not-blocked code path in the acquire
> sequence.
Actually, this may be an acceptable way to handle my issue. In the
non-blocking case, B's implementation does not have to actually
release A, but it could tell lockdep that it's released A, acquired B
and acquired A again. Kinda ugly but should work...
--
Michel "Walken" Lespinasse
A program is never fully debugged until the last user dies.
Powered by blists - more mailing lists