The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: Sasha Levin <levinsasha928@gmail.com>,
	Ingo Molnar <mingo@elte.hu>,
	Peter Zijlstra <peterz@infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Dave Jones <davej@redhat.com>
Subject: Re: rcu,sched: spinlock recursion on 3.5-rc2
Date: Tue, 12 Jun 2012 17:07:37 +0200 (CEST)	[thread overview]
Message-ID: <alpine.LFD.2.02.1206121701350.3086@ionos> (raw)
In-Reply-To: <20120612144705.GB2423@linux.vnet.ibm.com>

On Tue, 12 Jun 2012, Paul E. McKenney wrote:
> On Tue, Jun 12, 2012 at 03:40:13PM +0200, Thomas Gleixner wrote:
> > The torture thread got preempted. rcu_preempt_note_context_switch()
> > tries to unlock the boosting rt mutex.
> > 
> > Though rcu_preempt_note_context_switch() is called with rq lock
> > held. So it's not a surprise that the code will dead lock.
> > 
> > My brain hurts already from looking, so Paul to the rescue!
> 
> My brain hurts from beating my head on my desk.  It seems that attempts
> to enhance PREEMPT_RCU's read-side performance require even more paranoia
> than I normally bring to bear.  :-/
> 
> Please see below for what I expect is the relevant revert.
> 
> 							Thanx, Paul
> 
> ------------------------------------------------------------------------
> 
> Revert "rcu: Move PREEMPT_RCU preemption to switch_to() invocation"
> 
> This reverts commit 616c310e83b872024271c915c1b9ab505b9efad9
> (Move PREEMPT_RCU preemption to switch_to() invocation) which can
> result in runqueue deadlock.

Hmm, not sure. The deadlock was not triggered in switch_to. It was
just at the beginning of __schedule()

need_resched:
	preempt_disable();
        cpu = smp_processor_id();
	rq = cpu_rq(cpu);
        rcu_note_context_switch(cpu);
	
	Which ends up in rcu_read_unlock_special() which tries to
	unlock the rtmutex.

So that code is still there ....

Thanks,

	tglx

  reply	other threads:[~2012-06-12 15:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-12 11:35 rcu,sched: spinlock recursion on 3.5-rc2 Sasha Levin
2012-06-12 13:40 ` Thomas Gleixner
2012-06-12 14:47   ` Paul E. McKenney
2012-06-12 15:07     ` Thomas Gleixner [this message]
2012-06-12 15:15       ` Peter Zijlstra
2012-06-12 15:20         ` Thomas Gleixner
2012-06-12 15:25           ` Paul E. McKenney
2012-06-12 15:31         ` Sasha Levin
2012-06-12 15:22       ` Paul E. McKenney

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=alpine.LFD.2.02.1206121701350.3086@ionos \
    --to=tglx@linutronix.de \
    --cc=davej@redhat.com \
    --cc=levinsasha928@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=paulmck@linux.vnet.ibm.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