public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Joe Korty <joe.korty@ccur.com>
To: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: "fweisbec@gmail.com" <fweisbec@gmail.com>,
	"peterz@infradead.org" <peterz@infradead.org>,
	"laijs@cn.fujitsu.com" <laijs@cn.fujitsu.com>,
	"mathieu.desnoyers@efficios.com" <mathieu.desnoyers@efficios.com>,
	"dhowells@redhat.com" <dhowells@redhat.com>,
	"loic.minier@linaro.org" <loic.minier@linaro.org>,
	"dhaval.giani@gmail.com" <dhaval.giani@gmail.com>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"josh@joshtriplett.org" <josh@joshtriplett.org>,
	"houston.jim@comcast.net" <houston.jim@comcast.net>,
	"andi@firstfloor.org" <andi@firstfloor.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 8/9] jrcu: fix broken rcu_barrier
Date: Wed, 23 Mar 2011 09:46:28 -0400	[thread overview]
Message-ID: <20110323134628.GA4352@tsunami.ccur.com> (raw)
In-Reply-To: <20110323063524.GS2322@linux.vnet.ibm.com>

On Wed, Mar 23, 2011 at 02:35:24AM -0400, Paul E. McKenney wrote:
> On Mon, Mar 14, 2011 at 06:09:28PM -0400, Joe Korty wrote:
> > On Mon, Mar 14, 2011 at 04:47:18AM -0400, Paul E. McKenney wrote:
> > > On Sun, Mar 13, 2011 at 11:50:44PM -0400, Joe Korty wrote:
> > > > +void rcu_barrier(void)
> > > > +{
> > > > +	synchronize_sched();
> > > > +	synchronize_sched();
> > > > +}
> > > 
> > > This is still broken.  You need to wait until all pre-existing RCU
> > > callbacks on all CPUs have been invoked.  Although this does guarantee
> > > that all callbacks on the current CPU have been invoked, if one of the
> > > other CPUs is busy, it might not yet have processed the callbacks from
> > > earlier grace periods.  The usual way to take care of this is to post
> > > a callback on each CPU, then wait for them all to be invoked.
> > 
> > Hi Paul,
> > JRCU (eventually) chains together all callbacks from all
> > cpus into a single queue and then it expires that single
> > queue.  So the double synchronize_sched() should work as
> > a rcu_barrier implementation.
> 
> Hello, Joe,
> 
> So the following grace period is not permitted to start until all of
> the callbacks from the prior grace period have been invoked?

Yes, it is all synchronized.  Every cpu's current batch is
closed off at the same time.  We tolerate some fuzz in the
timing, but that is not the same as being unsynchronized.

This happens as an automatic side effect of doing
everything (except for call_rcu) from a single CPU.

Joe

  reply	other threads:[~2011-03-23 13:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-14  3:50 [PATCH 8/9] jrcu: fix broken rcu_barrier Joe Korty
2011-03-14  8:47 ` Paul E. McKenney
2011-03-14 22:09   ` Joe Korty
2011-03-23  6:35     ` Paul E. McKenney
2011-03-23 13:46       ` Joe Korty [this message]
2011-03-24  0:23         ` 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=20110323134628.GA4352@tsunami.ccur.com \
    --to=joe.korty@ccur.com \
    --cc=andi@firstfloor.org \
    --cc=dhaval.giani@gmail.com \
    --cc=dhowells@redhat.com \
    --cc=fweisbec@gmail.com \
    --cc=houston.jim@comcast.net \
    --cc=josh@joshtriplett.org \
    --cc=laijs@cn.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=loic.minier@linaro.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=peterz@infradead.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