All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Lan Tianyu <tianyu.lan@intel.com>,
	linux-kernel@vger.kernel.org, mingo@kernel.org,
	laijs@cn.fujitsu.com, dipankar@in.ibm.com,
	akpm@linux-foundation.org, mathieu.desnoyers@efficios.com,
	josh@joshtriplett.org, tglx@linutronix.de, peterz@infradead.org,
	rostedt@goodmis.org, dhowells@redhat.com, edumazet@google.com,
	dvhart@linux.intel.com, fweisbec@gmail.com, oleg@redhat.com,
	bobby.prani@gmail.com
Subject: Re: [PATCH RFC tip/core/rcu] Eliminate deadlock between CPU hotplug and expedited grace periods
Date: Thu, 18 Sep 2014 15:57:42 -0700	[thread overview]
Message-ID: <20140918225742.GV4723@linux.vnet.ibm.com> (raw)
In-Reply-To: <2028813.2ZT7cSJ4eY@vostro.rjw.lan>

On Fri, Sep 19, 2014 at 12:55:11AM +0200, Rafael J. Wysocki wrote:
> On Thursday, September 18, 2014 05:38:45 AM Paul E. McKenney wrote:
> > On Thu, Sep 18, 2014 at 03:15:36PM +0800, Lan Tianyu wrote:
> > > On 2014年09月17日 21:10, Paul E. McKenney wrote:
> > > > On Wed, Sep 17, 2014 at 03:11:42PM +0800, Lan Tianyu wrote:
> > > >> On 2014年08月29日 03:47, Paul E. McKenney wrote:
> > > >>> Currently, the expedited grace-period primitives do get_online_cpus().
> > > >>> This greatly simplifies their implementation, but means that calls to
> > > >>> them holding locks that are acquired by CPU-hotplug notifiers (to say
> > > >>> nothing of calls to these primitives from CPU-hotplug notifiers) can
> > > >>> deadlock.  But this is starting to become inconvenient:
> > > >>> https://lkml.org/lkml/2014/8/5/754
> > > >>>
> > > >>> This commit avoids the deadlock and retains the simplicity by creating
> > > >>> a try_get_online_cpus(), which returns false if the get_online_cpus()
> > > >>> reference count could not immediately be incremented.  If a call to
> > > >>> try_get_online_cpus() returns true, the expedited primitives operate
> > > >>> as before.  If a call returns false, the expedited primitives fall back
> > > >>> to normal grace-period operations.  This falling back of course results
> > > >>> in increased grace-period latency, but only during times when CPU
> > > >>> hotplug operations are actually in flight.  The effect should therefore
> > > >>> be negligible during normal operation.
> > > >>>
> > > >>> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
> > > >>> Cc: Josh Triplett <josh@joshtriplett.org>
> > > >>> Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
> > > >>> Cc: Lan Tianyu <tianyu.lan@intel.com>
> > > >>
> > > >> Hi Paul:
> > > >> 	What's the status of the patch? Will you push it? Thanks.
> > > > 
> > > > By default, it would go into 3.19.  Do you need it earlier?
> > > 
> > > IMO, this is a dead lock bug which is hard to reproduce and the patch
> > > should go into v3.17 and stable tree?
> > 
> > The problem with pushing for v3.17 is that I would have to rebase
> > that commit to the bottom of my current stack and redo all my testing.
> > If there were any problems, I could not only miss v3.17, but also miss
> > the v3.18 merge window.
> > 
> > So, given that the next merge window happens pretty soon, how about
> > v3.18 and the stable tree?
> 
> That sounds good to me.

Very good, I have added it to my v3.18 queue.

							Thanx, Paul


      reply	other threads:[~2014-09-18 22:57 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-28 19:47 [PATCH RFC tip/core/rcu] Eliminate deadlock between CPU hotplug and expedited grace periods Paul E. McKenney
2014-08-29  6:54 ` Lan Tianyu
2014-08-29 13:11   ` Paul E. McKenney
2014-09-01 11:20 ` Peter Zijlstra
2014-09-01 16:05   ` Paul E. McKenney
2014-09-01 16:17     ` Peter Zijlstra
2014-09-02 16:36       ` Paul E. McKenney
2014-09-03 11:31         ` Peter Zijlstra
2014-09-03 15:03           ` Paul E. McKenney
2014-09-03 15:28             ` Peter Zijlstra
2014-09-03 16:38               ` Paul E. McKenney
2014-09-17  7:11 ` Lan Tianyu
2014-09-17 13:10   ` Paul E. McKenney
2014-09-18  7:15     ` Lan Tianyu
2014-09-18 12:38       ` Paul E. McKenney
2014-09-18 22:55         ` Rafael J. Wysocki
2014-09-18 22: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=20140918225742.GV4723@linux.vnet.ibm.com \
    --to=paulmck@linux.vnet.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=bobby.prani@gmail.com \
    --cc=dhowells@redhat.com \
    --cc=dipankar@in.ibm.com \
    --cc=dvhart@linux.intel.com \
    --cc=edumazet@google.com \
    --cc=fweisbec@gmail.com \
    --cc=josh@joshtriplett.org \
    --cc=laijs@cn.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mingo@kernel.org \
    --cc=oleg@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rjw@rjwysocki.net \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=tianyu.lan@intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.