netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	netfilter-devel@vger.kernel.org, akpm@linux-foundation.org,
	torvalds@linux-foundation.org, davem@davemloft.net,
	dada1@cosmosbay.com, zbr@ioremap.net, jeff.chua.linux@gmail.com,
	paulus@samba.org, laijs@cn.fujitsu.com, jengelh@medozas.de,
	r000n@r000n.net, benh@kernel.crashing.org
Subject: Re: [PATCH RFC] v2 expedited "big hammer" RCU grace periods
Date: Sun, 26 Apr 2009 22:22:55 +0200	[thread overview]
Message-ID: <20090426202255.GA5365@elte.hu> (raw)
In-Reply-To: <20090426191343.GC29238@Krystal>


* Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> wrote:

> * Ingo Molnar (mingo@elte.hu) wrote:
> > 
> > * Paul E. McKenney <paulmck@linux.vnet.ibm.com> wrote:
> > 
> > > Second cut of "big hammer" expedited RCU grace periods, but only 
> > > for rcu_bh.  This creates another softirq vector, so that entering 
> > > this softirq vector will have forced an rcu_bh quiescent state (as 
> > > noted by Dave Miller).  Use smp_call_function() to invoke 
> > > raise_softirq() on all CPUs in order to cause this to happen.  
> > > Track the CPUs that have passed through a quiescent state (or gone 
> > > offline) with a cpumask.
> > 
> > hm, i'm still asking whether doing this would be simpler via a 
> > reschedule vector - which not only is an existing facility but also 
> > forces all RCU domains through a quiescent state - not just bh-RCU 
> > participants.
> > 
> > Triggering a new softirq is in no way simpler that doing an SMP 
> > cross-call - in fact softirqs are a finite resource so using some 
> > other facility would be preferred.
> > 
> > Am i missing something?
> > 
> 
> I think the reason for this whole thread is that waiting for rcu 
> quiescent state, when called many times e.g. in multiple iptables 
> invokations, takes too longs (5 seconds to load the netfilter 
> rules at boot). [...]

I'm aware of the problem space.

I was suggesting that to trigger the quiescent state and to wait for 
it to propagate it would be enough to reuse the reschedule 
mechanism.

It would be relatively straightforward: first a send-reschedule then 
do a wait_task_context_switch() on rq->curr - both are existing 
primitives. (a task reference has to be taken but that's pretty much 
all)

By the time wait_task_context_switch() returns from the last CPU we 
know that the quiescent state has passed.

	Ingo

  reply	other threads:[~2009-04-26 20:22 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-26  5:23 [PATCH RFC] v2 expedited "big hammer" RCU grace periods Paul E. McKenney
2009-04-26 11:27 ` Ingo Molnar
2009-04-26 19:13   ` Mathieu Desnoyers
2009-04-26 20:22     ` Ingo Molnar [this message]
2009-04-26 21:44       ` Paul E. McKenney
2009-04-27  3:26         ` Ingo Molnar
2009-04-27 13:21           ` Paul E. McKenney
2009-04-27 13:43             ` Ingo Molnar
2009-04-27 16:17               ` Paul E. McKenney
2009-04-27 15:54             ` Mathieu Desnoyers
2009-04-27 16:16               ` Paul E. McKenney
2009-04-27 20:56               ` Evgeniy Polyakov
2009-04-26 20:54   ` 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=20090426202255.GA5365@elte.hu \
    --to=mingo@elte.hu \
    --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=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --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).