diff mbox

hashtable: add hash_for_each_possible_rcu_notrace()

Message ID 1373084210-27767-1-git-send-email-aik@ozlabs.ru (mailing list archive)
State Not Applicable
Headers show

Commit Message

Alexey Kardashevskiy July 6, 2013, 4:16 a.m. UTC
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>
---
 include/linux/hashtable.h | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

Comments

Alexey Kardashevskiy July 15, 2013, 10:04 a.m. UTC | #1
Anyone, ping?

On 07/06/2013 02:16 PM, Alexey Kardashevskiy wrote:
> 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>
> ---
>  include/linux/hashtable.h | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/include/linux/hashtable.h b/include/linux/hashtable.h
> index a9df51f..af8b169 100644
> --- a/include/linux/hashtable.h
> +++ b/include/linux/hashtable.h
> @@ -174,6 +174,21 @@ static inline void hash_del_rcu(struct hlist_node *node)
>  		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
>   * @name: hashtable to iterate
>
Alexey Kardashevskiy July 23, 2013, 2:28 a.m. UTC | #2
Anyone, ping. Is it good, bad, ugly (ack/nack)? Thanks!

Is there any "trivial patches" list? Could not find it on vger.


On 07/15/2013 08:04 PM, Alexey Kardashevskiy wrote:
> Anyone, ping?
> 
> On 07/06/2013 02:16 PM, Alexey Kardashevskiy wrote:
>> 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>
>> ---
>>  include/linux/hashtable.h | 15 +++++++++++++++
>>  1 file changed, 15 insertions(+)
>>
>> diff --git a/include/linux/hashtable.h b/include/linux/hashtable.h
>> index a9df51f..af8b169 100644
>> --- a/include/linux/hashtable.h
>> +++ b/include/linux/hashtable.h
>> @@ -174,6 +174,21 @@ static inline void hash_del_rcu(struct hlist_node *node)
>>  		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
>>   * @name: hashtable to iterate
>>
> 
>
Joe Perches July 23, 2013, 2:41 a.m. UTC | #3
On Tue, 2013-07-23 at 12:28 +1000, Alexey Kardashevskiy wrote:
> Anyone, ping. Is it good, bad, ugly (ack/nack)? Thanks!
> 
> Is there any "trivial patches" list? Could not find it on vger.

Jiri Kosina has trivial@kernel.org

Also, there's kernel-janitors

http://vger.kernel.org/vger-lists.html#kernel-janitors
http://kernelnewbies.org/KernelJanitors

MAINTAINERS has an entry:

TRIVIAL PATCHES
M:	Jiri Kosina <trivial@kernel.org>
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial.git
S:	Maintained
K:	^Subject:.*(?i)trivial
Alexey Kardashevskiy July 23, 2013, 2:43 a.m. UTC | #4
On 07/23/2013 12:41 PM, Joe Perches wrote:
> On Tue, 2013-07-23 at 12:28 +1000, Alexey Kardashevskiy wrote:
>> Anyone, ping. Is it good, bad, ugly (ack/nack)? Thanks!
>>
>> Is there any "trivial patches" list? Could not find it on vger.
> 
> Jiri Kosina has trivial@kernel.org
> 
> Also, there's kernel-janitors
> 
> http://vger.kernel.org/vger-lists.html#kernel-janitors
> http://kernelnewbies.org/KernelJanitors
> 
> MAINTAINERS has an entry:
> 
> TRIVIAL PATCHES
> M:	Jiri Kosina <trivial@kernel.org>
> T:	git git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial.git
> S:	Maintained
> K:	^Subject:.*(?i)trivial


Cool, thanks! But is that patch really trivial? :)
Joe Perches July 23, 2013, 2:53 a.m. UTC | #5
On Tue, 2013-07-23 at 12:43 +1000, Alexey Kardashevskiy wrote:
> On 07/23/2013 12:41 PM, Joe Perches wrote:
> > On Tue, 2013-07-23 at 12:28 +1000, Alexey Kardashevskiy wrote:
> >> Anyone, ping. Is it good, bad, ugly (ack/nack)? Thanks!
> >> Is there any "trivial patches" list? Could not find it on vger.
[]
> > MAINTAINERS has an entry:
> > TRIVIAL PATCHES
> > M:	Jiri Kosina <trivial@kernel.org>
> > T:	git git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial.git
[]
> Cool, thanks! But is that patch really trivial? :)

:)  Was that the question?

Anyway, you cc'd all the right people already.

If no one responds after a couple weeks, either
send it to Jiri or directly to Linus.
Benjamin Herrenschmidt July 23, 2013, 7:52 a.m. UTC | #6
On Mon, 2013-07-22 at 19:53 -0700, Joe Perches wrote:
> Anyway, you cc'd all the right people already.
> 
> If no one responds after a couple weeks, either
> send it to Jiri or directly to Linus.

Or I'll just merge it with the rest of the series.

Cheers,
Ben.
diff mbox

Patch

diff --git a/include/linux/hashtable.h b/include/linux/hashtable.h
index a9df51f..af8b169 100644
--- a/include/linux/hashtable.h
+++ b/include/linux/hashtable.h
@@ -174,6 +174,21 @@  static inline void hash_del_rcu(struct hlist_node *node)
 		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
  * @name: hashtable to iterate