All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexey Kardashevskiy <aik@ozlabs.ru>
To: Alexey Kardashevskiy <aik@ozlabs.ru>
Cc: linux-kernel@vger.kernel.org,
	Sasha Levin <sasha.levin@oracle.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	"Paul E . McKenney" <paulmck@linux.vnet.ibm.com>,
	linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] hashtable: add hash_for_each_possible_rcu_notrace()
Date: Mon, 15 Jul 2013 20:04:27 +1000	[thread overview]
Message-ID: <51E3C92B.2070704@ozlabs.ru> (raw)
In-Reply-To: <1373084210-27767-1-git-send-email-aik@ozlabs.ru>

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

WARNING: multiple messages have this Message-ID (diff)
From: Alexey Kardashevskiy <aik@ozlabs.ru>
To: Alexey Kardashevskiy <aik@ozlabs.ru>
Cc: linuxppc-dev@lists.ozlabs.org,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Sasha Levin <sasha.levin@oracle.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	"Paul E . McKenney" <paulmck@linux.vnet.ibm.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] hashtable: add hash_for_each_possible_rcu_notrace()
Date: Mon, 15 Jul 2013 20:04:27 +1000	[thread overview]
Message-ID: <51E3C92B.2070704@ozlabs.ru> (raw)
In-Reply-To: <1373084210-27767-1-git-send-email-aik@ozlabs.ru>

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

  reply	other threads:[~2013-07-15 10:04 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-06  4:16 [PATCH] hashtable: add hash_for_each_possible_rcu_notrace() Alexey Kardashevskiy
2013-07-06  4:16 ` Alexey Kardashevskiy
2013-07-15 10:04 ` Alexey Kardashevskiy [this message]
2013-07-15 10:04   ` Alexey Kardashevskiy
2013-07-23  2:28   ` Alexey Kardashevskiy
2013-07-23  2:28     ` Alexey Kardashevskiy
2013-07-23  2:41     ` Joe Perches
2013-07-23  2:41       ` Joe Perches
2013-07-23  2:43       ` Alexey Kardashevskiy
2013-07-23  2:43         ` Alexey Kardashevskiy
2013-07-23  2:53         ` Joe Perches
2013-07-23  2:53           ` Joe Perches
2013-07-23  7:52           ` Benjamin Herrenschmidt
2013-07-23  7:52             ` Benjamin Herrenschmidt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51E3C92B.2070704@ozlabs.ru \
    --to=aik@ozlabs.ru \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=sasha.levin@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.