public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] rcu: call __rcu_read_unlock() in exit_rcu()
@ 2011-01-04  8:32 Lai Jiangshan
  2011-01-10  2:15 ` Paul E. McKenney
  0 siblings, 1 reply; 2+ messages in thread
From: Lai Jiangshan @ 2011-01-04  8:32 UTC (permalink / raw)
  To: Paul E. McKenney, LKML, Ingo Molnar


rcu_read_unlock() is a wrapper of many things:
	the core __rcu_read_unlock(), debugs...etc.

It is better that we only calls the core __rcu_read_unlock() here.

signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
---
diff --git a/kernel/rcutree_plugin.h b/kernel/rcutree_plugin.h
index a363871..94035a0 100644
--- a/kernel/rcutree_plugin.h
+++ b/kernel/rcutree_plugin.h
@@ -802,7 +802,7 @@ void exit_rcu(void)
 	if (t->rcu_read_lock_nesting == 0)
 		return;
 	t->rcu_read_lock_nesting = 1;
-	rcu_read_unlock();
+	__rcu_read_unlock();
 }
 
 #else /* #ifdef CONFIG_TREE_PREEMPT_RCU */

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] rcu: call __rcu_read_unlock() in exit_rcu()
  2011-01-04  8:32 [PATCH] rcu: call __rcu_read_unlock() in exit_rcu() Lai Jiangshan
@ 2011-01-10  2:15 ` Paul E. McKenney
  0 siblings, 0 replies; 2+ messages in thread
From: Paul E. McKenney @ 2011-01-10  2:15 UTC (permalink / raw)
  To: Lai Jiangshan; +Cc: LKML, Ingo Molnar

On Tue, Jan 04, 2011 at 04:32:25PM +0800, Lai Jiangshan wrote:
> 
> rcu_read_unlock() is a wrapper of many things:
> 	the core __rcu_read_unlock(), debugs...etc.
> 
> It is better that we only calls the core __rcu_read_unlock() here.

Hello, Lai!

Last time I checked, a task exiting in an RCU read-side critical section
got an error before it got to this point.  That said, the "__" does a
good job of indicating that this is not a normal end of an RCU read-side
critical section.

I have queued this at least for the moment, and also created a TINY_RCU
counterpart.

							Thanx, Paul

> signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
> ---
> diff --git a/kernel/rcutree_plugin.h b/kernel/rcutree_plugin.h
> index a363871..94035a0 100644
> --- a/kernel/rcutree_plugin.h
> +++ b/kernel/rcutree_plugin.h
> @@ -802,7 +802,7 @@ void exit_rcu(void)
>  	if (t->rcu_read_lock_nesting == 0)
>  		return;
>  	t->rcu_read_lock_nesting = 1;
> -	rcu_read_unlock();
> +	__rcu_read_unlock();
>  }
> 
>  #else /* #ifdef CONFIG_TREE_PREEMPT_RCU */

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-01-10  5:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-04  8:32 [PATCH] rcu: call __rcu_read_unlock() in exit_rcu() Lai Jiangshan
2011-01-10  2:15 ` Paul E. McKenney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox