[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110309221517.GB24670@tsunami.ccur.com>
Date: Wed, 9 Mar 2011 17:15:17 -0500
From: Joe Korty <joe.korty@...r.com>
To: Frederic Weisbecker <fweisbec@...il.com>
Cc: "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
Peter Zijlstra <peterz@...radead.org>,
Lai Jiangshan <laijs@...fujitsu.com>,
"mathieu.desnoyers@...icios.com" <mathieu.desnoyers@...icios.com>,
"dhowells@...hat.com" <dhowells@...hat.com>,
"loic.minier@...aro.org" <loic.minier@...aro.org>,
"dhaval.giani@...il.com" <dhaval.giani@...il.com>,
"tglx@...utronix.de" <tglx@...utronix.de>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"josh@...htriplett.org" <josh@...htriplett.org>,
"houston.jim@...cast.net" <houston.jim@...cast.net>
Subject: [PATCH 2/4] jrcu: tap rcu_read_unlock
jrcu: tap into rcu_read_unlock().
All places where rcu_read_unlock() is the final lock in
a set of nested rcu locks are known rcu quiescent points.
This patch recognizes that subset of those which also make
the task preemptable. The others are left unrecognized.
Not fundamentally needed, accelerates rcu batching.
Signed-off-by: Joe Korty <joe.korty@...r.com>
Index: b/include/linux/jrcu.h
===================================================================
--- a/include/linux/jrcu.h
+++ b/include/linux/jrcu.h
@@ -21,8 +21,10 @@
#ifndef __LINUX_JRCU_H
#define __LINUX_JRCU_H
+extern void rcu_read_unlock_jrcu(void);
+
#define __rcu_read_lock() preempt_disable()
-#define __rcu_read_unlock() preempt_enable()
+#define __rcu_read_unlock() rcu_read_unlock_jrcu()
#define __rcu_read_lock_bh() __rcu_read_lock()
#define __rcu_read_unlock_bh() __rcu_read_unlock()
Index: b/kernel/jrcu.c
===================================================================
--- a/kernel/jrcu.c
+++ b/kernel/jrcu.c
@@ -153,6 +153,14 @@ static inline void rcu_eob(int cpu)
}
}
+void rcu_read_unlock_jrcu(void)
+{
+ if (preempt_count() == 1)
+ rcu_eob(rcu_cpu());
+ preempt_enable();
+}
+EXPORT_SYMBOL_GPL(rcu_read_unlock_jrcu);
+
void rcu_note_context_switch(int cpu)
{
rcu_eob(cpu);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists