lkml.org 
[lkml]   [2008]   [Nov]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] rcupdate: move synchronize_sched() back to rcupdate.c V2
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.



\
 
 \ /
  Last update: 2008-11-14 02:09    [W:0.072 / U:0.808 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site