From: Mike Galbraith <efault@gmx.de>
To: Sebastian Siewior <bigeasy@linutronix.de>
Cc: Mikulas Patocka <mpatocka@redhat.com>,
linux-kernel@vger.kernel.org,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>,
Steven Rostedt <rostedt@goodmis.org>,
linux-rt-users@vger.kernel.org,
Peter Zijlstra <peterz@infradead.org>
Subject: Re: [PATCH PREEMPT RT] rt-mutex: fix deadlock in device mapper
Date: Mon, 20 Nov 2017 13:43:54 +0100 [thread overview]
Message-ID: <1511181834.11475.41.camel@gmx.de> (raw)
In-Reply-To: <20171120105310.zsd6kotreig6nvik@linutronix.de>
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
next prev parent reply other threads:[~2017-11-20 12:44 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-13 17:56 Mikulas Patocka
[not found] ` <20171114151415.d5tazbuhfbjugepg@linutronix.de>
2017-11-15 17:08 ` Mikulas Patocka
2017-11-17 14:57 ` Sebastian Siewior
2017-11-18 18:37 ` Mike Galbraith
2017-11-20 10:53 ` Sebastian Siewior
2017-11-20 12:43 ` Mike Galbraith [this message]
2017-11-20 13:49 ` Mike Galbraith
2017-11-20 21:31 ` Mikulas Patocka
2017-11-20 22:11 ` Mikulas Patocka
2017-11-20 21:33 ` Mikulas Patocka
2017-11-21 3:20 ` Mike Galbraith
2017-11-21 8:37 ` Thomas Gleixner
2017-11-21 9:18 ` Mike Galbraith
2017-11-21 16:11 ` Mikulas Patocka
2017-11-21 17:33 ` Mike Galbraith
2017-11-21 19:56 ` Mikulas Patocka
2017-11-21 21:20 ` Mike Galbraith
2017-11-23 14:42 ` Sebastian Siewior
2017-11-23 14:50 ` Mike Galbraith
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1511181834.11475.41.camel@gmx.de \
--to=efault@gmx.de \
--cc=bigeasy@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=mpatocka@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome