Skip to contentSkip to conversation

rcu: call __rcu_read_unlock() in exit_rcu()

PATCH In review Lai Jiangshan 2 participants 2 messages Jan 4, 2011 – Jan 10, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rcu: call __rcu_read_unlock() in exit_rcu()

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.

---

kernel/rcutree_plugin.h +1 -1
index a363871..94035a0 100644
@@ -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 */
#1 lore raw
Quoted 5 lines · Lai Jiangshan

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

Quoted 15 lines

---

kernel/rcutree_plugin.h +1 -1
index a363871..94035a0 100644
@@ -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 */