aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/rcu.h
diff options
context:
space:
mode:
authorPaul E. McKenney <paul.mckenney@linaro.org>2011-06-21 03:13:44 -0400
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2011-09-29 00:38:14 -0400
commite99033c5c160f1f247c665923a66acec693a967c (patch)
treec5b0863ad4b673134070872a159055237186f0fe /kernel/rcu.h
parent300df91ca9358f7f09298eec9503c12b32054ef7 (diff)
rcu: Put names into TINY_RCU structures under RCU_TRACE
In order to allow event tracing to distinguish between flavors of RCU, we need those names in the relevant RCU data structures. TINY_RCU has avoided them for memory-footprint reasons, so add them only if CONFIG_RCU_TRACE=y. Signed-off-by: Paul E. McKenney <paul.mckenney@linaro.org> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'kernel/rcu.h')
-rw-r--r--kernel/rcu.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/kernel/rcu.h b/kernel/rcu.h
index 7bc16436aba0..d7f00ec8b47b 100644
--- a/kernel/rcu.h
+++ b/kernel/rcu.h
@@ -23,6 +23,12 @@
23#ifndef __LINUX_RCU_H 23#ifndef __LINUX_RCU_H
24#define __LINUX_RCU_H 24#define __LINUX_RCU_H
25 25
26#ifdef CONFIG_RCU_TRACE
27#define RCU_TRACE(stmt) stmt
28#else /* #ifdef CONFIG_RCU_TRACE */
29#define RCU_TRACE(stmt)
30#endif /* #else #ifdef CONFIG_RCU_TRACE */
31
26/* 32/*
27 * debug_rcu_head_queue()/debug_rcu_head_unqueue() are used internally 33 * debug_rcu_head_queue()/debug_rcu_head_unqueue() are used internally
28 * by call_rcu() and rcu callback execution, and are therefore not part of the 34 * by call_rcu() and rcu callback execution, and are therefore not part of the
@@ -68,10 +74,10 @@ static inline void __rcu_reclaim(struct rcu_head *head)
68 unsigned long offset = (unsigned long)head->func; 74 unsigned long offset = (unsigned long)head->func;
69 75
70 if (__is_kfree_rcu_offset(offset)) { 76 if (__is_kfree_rcu_offset(offset)) {
71 trace_rcu_invoke_kfree_callback(head, offset); 77 RCU_TRACE(trace_rcu_invoke_kfree_callback(head, offset));
72 kfree((void *)head - offset); 78 kfree((void *)head - offset);
73 } else { 79 } else {
74 trace_rcu_invoke_callback(head); 80 RCU_TRACE(trace_rcu_invoke_callback(head));
75 head->func(head); 81 head->func(head);
76 } 82 }
77} 83}