From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Evgeniy Polyakov <zbr@ioremap.net>
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
netfilter-devel@vger.kernel.org, mingo@elte.hu,
akpm@linux-foundation.org, torvalds@linux-foundation.org,
davem@davemloft.net, dada1@cosmosbay.com,
jeff.chua.linux@gmail.com, paulus@samba.org,
laijs@cn.fujitsu.com, jengelh@medozas.de, r000n@r000n.net,
benh@kernel.crashing.org, mathieu.desnoyers@polymtl.ca
Subject: Re: [PATCH RFC] v5 expedited "big hammer" RCU grace periods
Date: Sun, 17 May 2009 15:08:35 -0700 [thread overview]
Message-ID: <20090517220835.GF6973@linux.vnet.ibm.com> (raw)
In-Reply-To: <20090517200223.GA31029@ioremap.net>
On Mon, May 18, 2009 at 12:02:23AM +0400, Evgeniy Polyakov wrote:
> Hi.
Hello, Evgeniy!
> On Sun, May 17, 2009 at 12:11:41PM -0700, Paul E. McKenney (paulmck@linux.vnet.ibm.com) wrote:
> > Fifth cut of "big hammer" expedited RCU grace periods. This uses per-CPU
> > kthreads that are scheduled in parallel by a call to smp_call_function()
> > by yet another kthread. The synchronize_sched(), synchronize_rcu(),
> > and synchronize_bh() primitives wake this kthread up and then wait for
> > it to force the grace period.
>
> I'm curious, but doesn't the fact that registered 'barrier' callback is
> invoked mean grace period completion? I.e. why to bother with
> rescheduling, waiting for thread to complete and so on, when we only
> care in the fact that 'barrier' callback is invoked, and thus all
> previous ones are completed?
> Or it is done just for the simplicity, since all rescheduling machinery
> already manages the rcu bits correctly, so you do not want to put it
> directly into 'barrier' callback?
It is a short-term expedient course of action. Longer term, I will drop
rcuclassic in favor of rcutree, and then merge rcupreempt into rcutree.
I will then add machinery to rcutree to handle expedited grace periods
(somewhat) more naturally. Trying to expedite three very different RCU
implementations seems a bit silly, hence the current off-on-the-side
approach.
But even then I will avoid relying on a "barrier" callback, or, indeed,
any sort of callback, because we don't want expedited grace periods to
have to wait on invocation of earlier RCU callbacks. There will thus
not be a call_rcu_expedited(), at least not unless someone comes up with
a -really- compelling reason why.
But the exercise of going through several possible implementations was
quite useful, as I learned a number of things that will improve the
eventual rcutree implementation. Like the fact that expedited grace
periods don't want to be waiting on invocation of prior callbacks. ;-)
And rcutiny is, as always, as special case. Here is the implementation
of synchronize_rcu_expedited() in rcutiny:
void synchronize_rcu_expedited(void)
{
}
Or even:
#define synchronize_rcu_expedited synchronize_rcu
;-)
Thanx, Paul
next prev parent reply other threads:[~2009-05-17 22:08 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-17 19:11 [PATCH RFC] v5 expedited "big hammer" RCU grace periods Paul E. McKenney
2009-05-17 20:02 ` Evgeniy Polyakov
2009-05-17 22:08 ` Paul E. McKenney [this message]
2009-05-18 6:59 ` Lai Jiangshan
2009-05-18 14:40 ` Paul E. McKenney
2009-05-18 7:56 ` Ingo Molnar
2009-05-18 15:14 ` Paul E. McKenney
2009-05-18 15:42 ` Ingo Molnar
2009-05-18 16:02 ` Paul E. McKenney
2009-05-19 8:58 ` Ingo Molnar
2009-05-19 12:33 ` Paul E. McKenney
2009-05-19 12:44 ` Ingo Molnar
2009-05-19 16:18 ` Paul E. McKenney
2009-05-20 8:09 ` Ingo Molnar
2009-05-20 15:30 ` Paul E. McKenney
2009-05-27 22:57 ` Ingo Molnar
2009-05-29 1:22 ` Paul E. McKenney
2009-05-29 12:06 ` Gautham R Shenoy
2009-05-30 4:56 ` 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=20090517220835.GF6973@linux.vnet.ibm.com \
--to=paulmck@linux.vnet.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=benh@kernel.crashing.org \
--cc=dada1@cosmosbay.com \
--cc=davem@davemloft.net \
--cc=jeff.chua.linux@gmail.com \
--cc=jengelh@medozas.de \
--cc=laijs@cn.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@polymtl.ca \
--cc=mingo@elte.hu \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=paulus@samba.org \
--cc=r000n@r000n.net \
--cc=torvalds@linux-foundation.org \
--cc=zbr@ioremap.net \
/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).