public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Frederic Weisbecker <fweisbec@gmail.com>
To: Josh Triplett <josh@joshtriplett.org>
Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 4/4 RFC] rcu: New rcu_user_enter_irq() and rcu_user_exit_irq() APIs
Date: Tue, 29 Nov 2011 14:53:53 +0100	[thread overview]
Message-ID: <20111129135344.GA20387@somewhere> (raw)
In-Reply-To: <20111128215323.GF30852@leaf>

On Mon, Nov 28, 2011 at 01:53:23PM -0800, Josh Triplett wrote:
> On Mon, Nov 28, 2011 at 10:24:47PM +0100, Frederic Weisbecker wrote:
> > A CPU running in adaptive tickless mode wants to enter into
> > RCU extended quiescent state while running in userspace. This
> > way we can shut down the tick that is usually needed on each
> > CPU for the needs of RCU.
> 
> Very awesome.  I've wanted to see this change for a long time.  Thanks!

:-)

> 
> > Typically, RCU enters the extended quiescent state when we resume
> > to userspace through a syscall or exception exit, this is done
> > using rcu_user_enter(). Then RCU exit this state by calling
> > rcu_user_exit() from syscall or exception entry.
> > 
> > However there are two other points where we may want to enter
> > or exit this state. Some remote CPU may require a tickless CPU
> > to restart its tick for any reason and send it an IPI for
> > this purpose. As we restart the tick, we don't want to resume
> > from the IPI in RCU extended quiescent state anymore.
> > Similarly we may stop the tick from an interrupt in userspace and
> > we need to be able to enter RCU extended quiescent state when we
> > resume from this interrupt to userspace.
> > 
> > To these ends, we provide two new APIs:
> > 
> > - rcu_user_enter_irq(). This must be called from a non-nesting
> > interrupt betwenn rcu_irq_enter() and rcu_irq_exit().
> > After the irq calls rcu_irq_exit(), we'll run into RCU extended
> > quiescent state.
> > 
> > - rcu_user_exit_irq(). This must be called from a non-nesting
> > interrupt, interrupting an RCU extended quiescent state, and
> > between rcu_irq_enter() and rcu_irq_exit(). After the irq calls
> > rcu_irq_exit(), we'll prevent from resuming the RCU extended
> > quiescent.
> 
> It would help to see the corresponding patches making use of this new
> API.

Right, so I plan to use it in my nohz cpuset patchset that can be found at:

	git://github.com/fweisbec/linux-dynticks.git
		nohz/cpuset-v1

I haven't yet integrated these patches to this tree. I first need to do a big
rebase against all the changes made against dynticks API in -rcu.

I'll do that soon.

  parent reply	other threads:[~2011-11-29 13:54 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-28 21:24 [PATCH 0/4] rcu: Make new RCU dynticks API work with nohz cpusets Frederic Weisbecker
2011-11-28 21:24 ` [PATCH 1/4] rcu: Don't check irq nesting from rcu idle entry/exit Frederic Weisbecker
2011-11-29  0:22   ` Paul E. McKenney
2011-11-29  0:26     ` Frederic Weisbecker
2011-11-29  0:39       ` Paul E. McKenney
2011-11-29  0:58         ` Frederic Weisbecker
2011-11-28 21:24 ` [PATCH 2/4] rcu: Irq nesting is always 0 on rcu_enter_idle_common Frederic Weisbecker
2011-11-29  0:29   ` Paul E. McKenney
2011-11-29  1:00     ` Frederic Weisbecker
2011-11-28 21:24 ` [PATCH 3/4 RFC] rcu: New rcu_user_enter() and rcu_user_exit() APIs Frederic Weisbecker
2011-11-28 21:24 ` [PATCH 4/4 RFC] rcu: New rcu_user_enter_irq() and rcu_user_exit_irq() APIs Frederic Weisbecker
2011-11-28 21:53   ` Josh Triplett
2011-11-29  1:00     ` Paul E. McKenney
2011-11-29  5:21       ` Josh Triplett
2011-11-29 14:05       ` Frederic Weisbecker
2011-11-29 18:23         ` Paul E. McKenney
2011-11-29 13:53     ` Frederic Weisbecker [this message]
2011-11-29  5:22 ` [PATCH 0/4] rcu: Make new RCU dynticks API work with nohz cpusets Josh Triplett
2011-11-29  5:43   ` Paul E. McKenney
2011-11-29  8:48     ` Josh Triplett
2011-11-29 17:44       ` Paul E. McKenney
2011-11-29 18:07         ` Frederic Weisbecker

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=20111129135344.GA20387@somewhere \
    --to=fweisbec@gmail.com \
    --cc=josh@joshtriplett.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulmck@linux.vnet.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox