[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1511181834.11475.41.camel@gmx.de>
Date: Mon, 20 Nov 2017 13:43:54 +0100
From: Mike Galbraith <efault@....de>
To: Sebastian Siewior <bigeasy@...utronix.de>
Cc: Mikulas Patocka <mpatocka@...hat.com>,
linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
Steven Rostedt <rostedt@...dmis.org>,
linux-rt-users@...r.kernel.org,
Peter Zijlstra <peterz@...radead.org>
Subject: Re: [PATCH PREEMPT RT] rt-mutex: fix deadlock in device mapper
On Mon, 2017-11-20 at 11:53 +0100, Sebastian Siewior wrote:
>
> To your question whether or not delaying IO can cause any deadlocks is
> something that I can't answer and this something that would affect !RT,
> too. I tried to add lockdep to bit-spinlocks but this does not work
> because one context acquires the lock and another does the unlock. It
> has been explained to me that no deadlocks should happen as long as
> the IO is flushed before we block/wait on a lock.
That wasn't the question (guess I didn't formulate it well). What I
was concerned about was the possibility that the situation that caused
me to add that __migrate_disabled() qualifier might arise anew, but
with different players.
At the time, I had to add that qualifier to prevent ABBA between the
owner of q->queue_lock, who was blocked by a lock ALREADY held by the
task trying to pull its plug, who then met the locked q->queue_lock.
Ergo the less than perfect hack to only allow pulling the plug when
NOT YET holding a spinlock. The problem was converted spinlocks (and
added RT locks).
-Mike
Powered by blists - more mailing lists