Skip to content

Commit

Permalink
hashtable: add hash_for_each_possible_rcu_notrace()
Browse files Browse the repository at this point in the history
This adds hash_for_each_possible_rcu_notrace() which is basically
a notrace clone of hash_for_each_possible_rcu() which cannot be
used in real mode due to its tracing/debugging capability.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
  • Loading branch information
Alexey Kardashevskiy authored and Benjamin Herrenschmidt committed Oct 11, 2013
1 parent 8b5ede6 commit 81fcfb8
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions include/linux/hashtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,21 @@ static inline void hash_del_rcu(struct hlist_node *node)
hlist_for_each_entry_rcu(obj, &name[hash_min(key, HASH_BITS(name))],\
member)

/**
* hash_for_each_possible_rcu_notrace - iterate over all possible objects hashing
* to the same bucket in an rcu enabled hashtable in a rcu enabled hashtable
* @name: hashtable to iterate
* @obj: the type * to use as a loop cursor for each entry
* @member: the name of the hlist_node within the struct
* @key: the key of the objects to iterate over
*
* This is the same as hash_for_each_possible_rcu() except that it does
* not do any RCU debugging or tracing.
*/
#define hash_for_each_possible_rcu_notrace(name, obj, member, key) \
hlist_for_each_entry_rcu_notrace(obj, \
&name[hash_min(key, HASH_BITS(name))], member)

/**
* hash_for_each_possible_safe - iterate over all possible objects hashing to the
* same bucket safe against removals
Expand Down

0 comments on commit 81fcfb8

Please sign in to comment.