From: Mike Galbraith <efault@gmx.de>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Mikulas Patocka <mpatocka@redhat.com>,
Sebastian Siewior <bigeasy@linutronix.de>,
linux-kernel@vger.kernel.org, Ingo Molnar <mingo@redhat.com>,
Steven Rostedt <rostedt@goodmis.org>,
linux-rt-users@vger.kernel.org
Subject: Re: [PATCH PREEMPT RT] rt-mutex: fix deadlock in device mapper
Date: Tue, 21 Nov 2017 10:18:04 +0100 [thread overview]
Message-ID: <1511255884.7672.49.camel@gmx.de> (raw)
In-Reply-To: <alpine.DEB.2.20.1711210931460.1782@nanos>
On Tue, 2017-11-21 at 09:37 +0100, Thomas Gleixner wrote:
> On Tue, 21 Nov 2017, Mike Galbraith wrote:
> > On Mon, 2017-11-20 at 16:33 -0500, Mikulas Patocka wrote:
> > >
> > > Is there some specific scenario where you need to call
> > > blk_schedule_flush_plug from rt_spin_lock_fastlock?
> >
> > Excellent question. What's the difference between not getting IO
> > started because you meet a mutex with an rt_mutex under the hood, and
> > not getting IO started because you meet a spinlock with an rt_mutex
> > under the hood? If just doing the mutex side puts this thing back to
> > sleep, I'm happy.
>
> Think about it from the mainline POV.
>
> The spinlock cannot ever go to schedule and therefore cannot create a
> situation which requires an unplug. The RT substitution of the spinlock
> with a rtmutex based sleeping spinlock should not change that at all.
>
> A regular mutex/rwsem etc. can and will unplug when the lock is contended
> and the caller blocks. The RT conversion of these locks to rtmutex based
> variants creates the problem: Unplug cannot be called when the task has
> pi_blocked_on set because the unplug path might content on yet another
> lock. So unplugging in the slow path before setting pi_blocked_on is the
> right thing to do.
Sure. What alarms me about IO deadlocks reappearing after all this
time is that at the time I met them, I needed every last bit of that
patchlet I showed to kill them, whether that should have been the case
or not. 'course that tree contained roughly a zillion patches..
Whatever, time will tell if I'm properly alarmed, or merely paranoid :)
-Mike
next prev parent reply other threads:[~2017-11-21 9:18 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
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 [this message]
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=1511255884.7672.49.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=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