public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Frederic Weisbecker <fweisbec@gmail.com>
To: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: linux-kernel@vger.kernel.org, mingo@elte.hu,
	laijs@cn.fujitsu.com, dipankar@in.ibm.com,
	akpm@linux-foundation.org, mathieu.desnoyers@polymtl.ca,
	josh@joshtriplett.org, dvhltc@us.ibm.com, niv@us.ibm.com,
	tglx@linutronix.de, peterz@infradead.org, rostedt@goodmis.org,
	Valdis.Kletnieks@vt.edu, dhowells@redhat.com
Subject: Re: [PATCH RFC tip/core/rcu] v2 accelerate grace period if last non-dynticked CPU
Date: Thu, 4 Feb 2010 01:53:30 +0100	[thread overview]
Message-ID: <20100204005327.GJ5068@nowhere> (raw)
In-Reply-To: <20100201042404.GD6721@linux.vnet.ibm.com>

On Sun, Jan 31, 2010 at 08:24:04PM -0800, Paul E. McKenney wrote:
> There is nothing illegal about the following:
> 
> 	static void my_rcu_callback(struct rcu_head *rcu)
> 	{
> 		struct foo *fp = container_of(rcu, struct foo, rcu_head);
> 
> 		if (fp->refcnt != 0) {
> 			call_rcu(rcu);
> 			return;
> 		}
> 		kfree(fp);
> 	}
> 
> And allowing RCU_NEEDS_CPU_FLUSHES of infinity would work correctly in
> some sense, but would be a massive power inefficiency.
> 
> The choice of "5" allows a callback that posts one other callback,
> which happens often enough to be worth the extra iterations.  It is
> necessary to budget two passes through the loop per level of RCU
> callback, one for the current CPU to start the grace period and another
> for it to end it.
> 
> Seem reasonable?


Yeah ok, I did not considered situations like the above example.

Thanks.


      reply	other threads:[~2010-02-04  0:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-28 15:32 [PATCH RFC tip/core/rcu] v2 accelerate grace period if last non-dynticked CPU Paul E. McKenney
2010-01-31 19:23 ` Frederic Weisbecker
2010-02-01  4:24   ` Paul E. McKenney
2010-02-04  0:53     ` Frederic Weisbecker [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=20100204005327.GJ5068@nowhere \
    --to=fweisbec@gmail.com \
    --cc=Valdis.Kletnieks@vt.edu \
    --cc=akpm@linux-foundation.org \
    --cc=dhowells@redhat.com \
    --cc=dipankar@in.ibm.com \
    --cc=dvhltc@us.ibm.com \
    --cc=josh@joshtriplett.org \
    --cc=laijs@cn.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@polymtl.ca \
    --cc=mingo@elte.hu \
    --cc=niv@us.ibm.com \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.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