All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lai Jiangshan <laijs@cn.fujitsu.com>
To: paulmck@linux.vnet.ibm.com
Cc: Ingo Molnar <mingo@elte.hu>,
	Peter Zijlstra <peterz@infradead.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	corbet@lwn.net
Subject: Re: [PATCH] rcupdate: move synchronize_sched() back to rcupdate.c V2
Date: Fri, 14 Nov 2008 09:03:20 +0800	[thread overview]
Message-ID: <491CCE58.1040701@cn.fujitsu.com> (raw)
In-Reply-To: <20081113173114.GA6788@linux.vnet.ibm.com>

Paul E. McKenney wrote:
> On Thu, Nov 13, 2008 at 10:48:33AM +0800, Lai Jiangshan wrote:
>> Hi, Paul,
>>
>> Could you add a RCU document about unloadable modules for kernel?
> 
> You thinking in terms of an ASCII version of
> http://lwn.net/Articles/217484/?
> 
> If so, please see attached patch and let me know what you think.
> Being too lazy to convert the cartoon to ASCII graphics, I simply
> left a URL to the .jpg on the LWN website.  Thus we need an ack/nack
> from Jon Corbet (CCed).

Hi, Paul

Thank you. it's a very good document.

I found several modules which need rcu_barrier(). So I'm going to
do some cleanup for them. A document for rcu_barrier() will help
these cleanup patches be accepted easily by maintainers.

Lai.

> 
> Of course, an alternative is to simply include the URL of the original
> LWN article in 00-INDEX.  Thoughts?
> 
> 							Thanx, Paul
> 
> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
> ---

> +The code for rcu_barrier() is as follows:
> +
> + 1 void rcu_barrier(void)
> + 2 {
> + 3   BUG_ON(in_interrupt());
> + 4   /* Take cpucontrol mutex to protect against CPU hotplug */
> + 5   mutex_lock(&rcu_barrier_mutex);
> + 6   init_completion(&rcu_barrier_completion);
> + 7   atomic_set(&rcu_barrier_cpu_count, 0);
> + 8   on_each_cpu(rcu_barrier_func, NULL, 0, 1);
> + 9   wait_for_completion(&rcu_barrier_completion);
> +10   mutex_unlock(&rcu_barrier_mutex);
> +11 }
> +

this is a little old.

> +
> +Quick Quiz #2: Why is there no rcu_barrier_bh()?
> +
> +Answer: Because no one has needed it yet. As soon as someone needs to
> +	use call_rcu_bh() from within an unloadable module, they will
> +	need an rcu_barrier_bh().
> +

add here.


  reply	other threads:[~2008-11-14  1:06 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-06  6:47 [PATCH] rcupdate: move synchronize_sched() back to rcupdate.c V2 Lai Jiangshan
2008-11-06  6:57 ` Ingo Molnar
2008-11-09  0:51 ` Paul E. McKenney
2008-11-10  3:22   ` Lai Jiangshan
2008-11-10 18:45     ` Paul E. McKenney
2008-11-11  0:55       ` Lai Jiangshan
2008-11-11  1:03         ` Paul E. McKenney
2008-11-13  2:48           ` Lai Jiangshan
2008-11-13 17:31             ` Paul E. McKenney
2008-11-14  1:03               ` Lai Jiangshan [this message]
2008-11-14  2:11                 ` Paul E. McKenney
2008-11-14  7:39                   ` Lai Jiangshan
2008-11-14 19:25                     ` Jonathan Corbet
2008-11-15 20:39                       ` Paul E. McKenney
2008-11-17 12:57                         ` Lai Jiangshan
2008-11-17 21:28                           ` Jonathan Corbet

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=491CCE58.1040701@cn.fujitsu.com \
    --to=laijs@cn.fujitsu.com \
    --cc=akpm@linux-foundation.org \
    --cc=corbet@lwn.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=peterz@infradead.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.