linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mike Galbraith <umgwanakikbuti@gmail.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-kernel@vger.kernel.org,
	linux-rt-users <linux-rt-users@vger.kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Carsten Emde <C.Emde@osadl.org>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	John Kacur <jkacur@redhat.com>,
	Paul Gortmaker <paul.gortmaker@windriver.com>
Subject: Re: [PATCH RT 2/4] Revert "timers: do not raise softirq unconditionally"
Date: Thu, 19 Mar 2015 09:17:09 +0100	[thread overview]
Message-ID: <1426753029.4168.80.camel@gmail.com> (raw)
In-Reply-To: <20150317163551.3093b6c2@gandalf.local.home>

On Tue, 2015-03-17 at 16:35 -0400, Steven Rostedt wrote:
> On Tue, 17 Mar 2015 12:35:43 -0400
> Steven Rostedt <rostedt@goodmis.org> wrote:
> 
> > 3.10.70-rt75-rc2 stable review patch.
> > If anyone has any objections, please let me know.
> > 
> > ------------------
> > 
> 
> Here's the missing change log for this revert. I'll go back and add it
> in:
> 
> 
> An issue arisen that if a rt_mutex (spin_lock converted to a mutex
> in PREEMPT_RT) is taken in hard interrupt context, it could cause
> a false deadlock detection and trigger a BUG_ON() from the return
> value of task_blocks_on_rt_mutex() in rt_spin_lock_slowlock().
> 
> The problem is this:
> 
>     CPU0			CPU1
>     ----			----
>   spin_lock(A)
> 				spin_lock(A)
> 			[ blocks, but spins as owner on
> 			  CPU 0 is running ]
> 
> 				<interrupt>
> 					spin_trylock(B)
> 					[ succeeds ]
> 
>   spin_lock(B)
>   <blocks>
> 
> Now the deadlock detection triggers and follows the locking:
> 
>   Task X (on CPU0) blocked on spinlock B owned by task Y on
>   CPU1 (via the interrupt taking it with a try lock)
> 
>   The owner of B (Y) is blocked on spin_lock A (still spinning)
>   A is owned by task X (self). DEADLOCK detected! BUG_ON triggered.
> 
> This was caused by the code to try to not raise softirq unconditionally
> to allow NO_HZ_FULL to work. Unfortunately, reverting that patch causes
> NO_HZ_FULL to break again, but that's still better than triggering
> a BUG_ON().


(aw crap, let's go shopping)... so why is the one in timer.c ok?

	-Mike

  reply	other threads:[~2015-03-19  8:17 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-17 16:35 [PATCH RT 0/4] Linux 3.10.70-rt75-rc2 Steven Rostedt
2015-03-17 16:35 ` [PATCH RT 1/4] fs,btrfs: fix rt deadlock on extent_buffer->lock Steven Rostedt
2015-03-17 16:35 ` [PATCH RT 2/4] Revert "timers: do not raise softirq unconditionally" Steven Rostedt
2015-03-17 20:35   ` Steven Rostedt
2015-03-19  8:17     ` Mike Galbraith [this message]
2015-03-19 16:26       ` Steven Rostedt
2015-03-19 16:42         ` Thavatchai Makphaibulchoke
2015-03-21 18:02           ` Mike Galbraith
2015-03-23  4:42             ` Mike Galbraith
2015-03-26  2:17               ` Thavatchai Makphaibulchoke
2015-03-26  5:23                 ` Mike Galbraith
2015-03-26  6:01                   ` Mike Galbraith
2015-03-26  6:27                   ` Mike Galbraith
2015-03-26 13:53                     ` Steven Rostedt
2015-03-24 18:15             ` Sebastian Andrzej Siewior
2015-03-25  2:38               ` Mike Galbraith
2015-03-24 18:10         ` Sebastian Andrzej Siewior
2015-03-25  2:33           ` Mike Galbraith
2015-04-09 13:39             ` Sebastian Andrzej Siewior
2015-08-11 23:21               ` Jiang, Yunhong
2015-03-17 16:35 ` [PATCH RT 3/4] netpoll: guard the access to dev->npinfo with rcu_read_lock/unlock_bh() for CONFIG_PREEMPT_RT_FULL=y Steven Rostedt
2015-03-17 16:35 ` [PATCH RT 4/4] Linux 3.10.70-rt75-rc2 Steven Rostedt
  -- strict thread matches above, loose matches on Subject: below --
2015-03-17 16:30 [PATCH RT 0/4] Linux 3.12.38-rt53-rc2 Steven Rostedt
2015-03-17 16:30 ` [PATCH RT 2/4] Revert "timers: do not raise softirq unconditionally" Steven Rostedt
2015-03-17 16:25 [PATCH RT 0/4] Linux 3.14.34-rt32-rc2 Steven Rostedt
2015-03-17 16:25 ` [PATCH RT 2/4] Revert "timers: do not raise softirq unconditionally" Steven Rostedt

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=1426753029.4168.80.camel@gmail.com \
    --to=umgwanakikbuti@gmail.com \
    --cc=C.Emde@osadl.org \
    --cc=bigeasy@linutronix.de \
    --cc=jkacur@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=paul.gortmaker@windriver.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;
as well as URLs for NNTP newsgroup(s).