Skip to content

Commit 81fcfb8

Browse files
aikozbenh
authored andcommitted
hashtable: add hash_for_each_possible_rcu_notrace()
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 <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
1 parent 8b5ede6 commit 81fcfb8

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

include/linux/hashtable.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,21 @@ static inline void hash_del_rcu(struct hlist_node *node)
173173
hlist_for_each_entry_rcu(obj, &name[hash_min(key, HASH_BITS(name))],\
174174
member)
175175

176+
/**
177+
* hash_for_each_possible_rcu_notrace - iterate over all possible objects hashing
178+
* to the same bucket in an rcu enabled hashtable in a rcu enabled hashtable
179+
* @name: hashtable to iterate
180+
* @obj: the type * to use as a loop cursor for each entry
181+
* @member: the name of the hlist_node within the struct
182+
* @key: the key of the objects to iterate over
183+
*
184+
* This is the same as hash_for_each_possible_rcu() except that it does
185+
* not do any RCU debugging or tracing.
186+
*/
187+
#define hash_for_each_possible_rcu_notrace(name, obj, member, key) \
188+
hlist_for_each_entry_rcu_notrace(obj, \
189+
&name[hash_min(key, HASH_BITS(name))], member)
190+
176191
/**
177192
* hash_for_each_possible_safe - iterate over all possible objects hashing to the
178193
* same bucket safe against removals

0 commit comments

Comments
 (0)