From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Dave Jones <davej@codemonkey.org.uk>,
Linux Kernel <linux-kernel@vger.kernel.org>,
Ingo Molnar <mingo@redhat.com>,
Stephane Eranian <eranian@gmail.com>,
Andi Kleen <andi@firstfloor.org>
Subject: Re: perf related lockdep bug
Date: Wed, 4 Nov 2015 17:57:24 -0800 [thread overview]
Message-ID: <20151105015724.GA29027@linux.vnet.ibm.com> (raw)
In-Reply-To: <20151104143419.GY3604@twins.programming.kicks-ass.net>
On Wed, Nov 04, 2015 at 03:34:19PM +0100, Peter Zijlstra wrote:
> On Wed, Nov 04, 2015 at 06:01:33AM -0800, Paul E. McKenney wrote:
> > On Wed, Nov 04, 2015 at 11:28:00AM +0100, Peter Zijlstra wrote:
> > > On Wed, Nov 04, 2015 at 11:21:51AM +0100, Peter Zijlstra wrote:
> > >
> > > > The problem appears to be due to the new RCU expedited grace period
> > > > stuff, with rcu_read_unlock() now randomly trying to acquire locks it
> > > > previously didn't.
> > > >
> > > > Lemme go look at those rcu bits again..
> > >
> > > Paul, I think this is because of:
> > >
> > > 8203d6d0ee78 ("rcu: Use single-stage IPI algorithm for RCU expedited grace period")
> > >
> > > What happens is that the IPI comes in and tags any random
> > > rcu_read_unlock() with the special bit, which then goes on and takes
> > > locks.
> > >
> > > Now the problem is that we have scheduler activity inside this lock;
> > > the one reported lockdep seems easy enough to fix, see below.
> > >
> > > I'll got and see if there's more sites than can cause this.
> >
> > This one only happens during boot time, but it would be good hygiene
> > in any case. May I have your SOB on this?
>
> Of course,
>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Thank you, applied as shown below.
Thanx, Paul
------------------------------------------------------------------------
commit 05faf451f1239a28fcd63bf4b66c0db57d7b13f9
Author: Peter Zijlstra <peterz@infradead.org>
Date: Wed Nov 4 08:22:05 2015 -0800
rcu: Move wakeup out from under rnp->lock
This patch removes a potential deadlock hazard by moving the
wake_up_process() in rcu_spawn_gp_kthread() out from under rnp->lock.
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index caf3651fa5c9..183445959d00 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -4323,8 +4323,8 @@ static int __init rcu_spawn_gp_kthread(void)
sp.sched_priority = kthread_prio;
sched_setscheduler_nocheck(t, SCHED_FIFO, &sp);
}
- wake_up_process(t);
raw_spin_unlock_irqrestore(&rnp->lock, flags);
+ wake_up_process(t);
}
rcu_spawn_nocb_kthreads();
rcu_spawn_boost_kthreads();
prev parent reply other threads:[~2015-11-05 1:57 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-04 5:17 perf related lockdep bug Dave Jones
2015-11-04 10:21 ` Peter Zijlstra
2015-11-04 10:28 ` Peter Zijlstra
2015-11-04 10:50 ` Peter Zijlstra
2015-11-04 13:48 ` Paul E. McKenney
2015-11-04 14:20 ` Peter Zijlstra
2015-11-04 15:34 ` Paul E. McKenney
2015-11-04 15:36 ` Peter Zijlstra
2015-11-04 15:51 ` Paul E. McKenney
2015-11-04 20:58 ` Andi Kleen
2015-11-05 0:55 ` Paul E. McKenney
2015-11-05 1:59 ` Paul E. McKenney
2015-11-05 2:46 ` Andi Kleen
2015-11-05 14:04 ` Paul E. McKenney
2015-11-11 13:29 ` Paul E. McKenney
2015-11-10 6:39 ` [tip:perf/urgent] perf: Disable IRQs across RCU RS CS that acquires scheduler lock tip-bot for Paul E. McKenney
2015-11-04 14:01 ` perf related lockdep bug Paul E. McKenney
2015-11-04 14:34 ` Peter Zijlstra
2015-11-05 1:57 ` Paul E. McKenney [this message]
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=20151105015724.GA29027@linux.vnet.ibm.com \
--to=paulmck@linux.vnet.ibm.com \
--cc=andi@firstfloor.org \
--cc=davej@codemonkey.org.uk \
--cc=eranian@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
/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).