aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/rculist.h
diff options
context:
space:
mode:
authorSteven Rostedt <rostedt@goodmis.org>2013-05-28 14:38:42 -0400
committerSteven Rostedt <rostedt@goodmis.org>2013-05-28 22:47:13 -0400
commit12bcbe66d7b3cc9f9f86cd02f925666eaa3c2107 (patch)
tree54e70e0f7450aedfee1418742758dc538d9649e5 /include/linux/rculist.h
parent6721cb60022629ae76365551f05d9658b8d14c55 (diff)
rcu: Add _notrace variation of rcu_dereference_raw() and hlist_for_each_entry_rcu()
As rcu_dereference_raw() under RCU debug config options can add quite a bit of checks, and that tracing uses rcu_dereference_raw(), these checks happen with the function tracer. The function tracer also happens to trace these debug checks too. This added overhead can livelock the system. Add a new interface to RCU for both rcu_dereference_raw_notrace() as well as hlist_for_each_entry_rcu_notrace() as the hlist iterator uses the rcu_dereference_raw() as well, and is used a bit with the function tracer. Link: http://lkml.kernel.org/r/20130528184209.304356745@goodmis.org Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'include/linux/rculist.h')
-rw-r--r--include/linux/rculist.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/linux/rculist.h b/include/linux/rculist.h
index 8089e35d47ac..f4b1001a4676 100644
--- a/include/linux/rculist.h
+++ b/include/linux/rculist.h
@@ -461,6 +461,26 @@ static inline void hlist_add_after_rcu(struct hlist_node *prev,
461 &(pos)->member)), typeof(*(pos)), member)) 461 &(pos)->member)), typeof(*(pos)), member))
462 462
463/** 463/**
464 * hlist_for_each_entry_rcu_notrace - iterate over rcu list of given type (for tracing)
465 * @pos: the type * to use as a loop cursor.
466 * @head: the head for your list.
467 * @member: the name of the hlist_node within the struct.
468 *
469 * This list-traversal primitive may safely run concurrently with
470 * the _rcu list-mutation primitives such as hlist_add_head_rcu()
471 * as long as the traversal is guarded by rcu_read_lock().
472 *
473 * This is the same as hlist_for_each_entry_rcu() except that it does
474 * not do any RCU debugging or tracing.
475 */
476#define hlist_for_each_entry_rcu_notrace(pos, head, member) \
477 for (pos = hlist_entry_safe (rcu_dereference_raw_notrace(hlist_first_rcu(head)),\
478 typeof(*(pos)), member); \
479 pos; \
480 pos = hlist_entry_safe(rcu_dereference_raw_notrace(hlist_next_rcu(\
481 &(pos)->member)), typeof(*(pos)), member))
482
483/**
464 * hlist_for_each_entry_rcu_bh - iterate over rcu list of given type 484 * hlist_for_each_entry_rcu_bh - iterate over rcu list of given type
465 * @pos: the type * to use as a loop cursor. 485 * @pos: the type * to use as a loop cursor.
466 * @head: the head for your list. 486 * @head: the head for your list.