From patchwork Thu Aug 1 04:44:23 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Kardashevskiy X-Patchwork-Id: 263910 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 1E2392C0784 for ; Thu, 1 Aug 2013 14:48:07 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752138Ab3HAEoy (ORCPT ); Thu, 1 Aug 2013 00:44:54 -0400 Received: from mail-pd0-f180.google.com ([209.85.192.180]:47716 "EHLO mail-pd0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750858Ab3HAEow (ORCPT ); Thu, 1 Aug 2013 00:44:52 -0400 Received: by mail-pd0-f180.google.com with SMTP id 15so1553612pdi.25 for ; Wed, 31 Jul 2013 21:44:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=wcM4qN+29QW1lJuTW/WP6l6skMq/WqAIWh7lBKgkxrs=; b=kxwTfoYE6cbNRsehtSl1qPT1xDNaXhLIQHOM/EDT+/VPEKMJsLTEAq0COSGmdn7IQx 46i3tpaqskXdz9NFXbk3CW9OvTFtJj6FXta4aU4sc+5+xEaBCdB1HDBf0D7/MJ/Cej0F ELo5J+qpgWZCNsOQz+PdOcauDV5h70SjPgh+o73jlJxPiNGLJ8Bp4ycIIxJFxkezDXfM Uqm1RFzW52xmriKcvr8CZrIcxDOQXZJSPsFaztQN3aedd4FQcs+zU/nIE1Z40+VwlBk1 zfSV5R0D7ajbn2sPrEmsawZG3LDtWuUM3k7YAEkYsqsun4zX8h3gigdPKem0pTD2geaq LAXA== X-Received: by 10.68.189.36 with SMTP id gf4mr84126204pbc.27.1375332291935; Wed, 31 Jul 2013 21:44:51 -0700 (PDT) Received: from ka1.ozlabs.ibm.com (ibmaus65.lnk.telstra.net. [165.228.126.9]) by mx.google.com with ESMTPSA id pu5sm266611pac.21.2013.07.31.21.44.46 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 31 Jul 2013 21:44:50 -0700 (PDT) From: Alexey Kardashevskiy To: linuxppc-dev@lists.ozlabs.org Cc: Alexey Kardashevskiy , Benjamin Herrenschmidt , Paul Mackerras , Alexander Graf , kvm@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, kvm-ppc@vger.kernel.org Subject: [PATCH 01/10] hashtable: add hash_for_each_possible_rcu_notrace() Date: Thu, 1 Aug 2013 14:44:23 +1000 Message-Id: <1375332272-22176-2-git-send-email-aik@ozlabs.ru> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1375332272-22176-1-git-send-email-aik@ozlabs.ru> References: <1375332272-22176-1-git-send-email-aik@ozlabs.ru> X-Gm-Message-State: ALoCoQk7cB/SWhxWT+G2R4SUIWQ0rUBNqHa9VqUME5whOyIfSa3Yr7UjE5bMPe2tcrY4/z3Cs6Lu Sender: kvm-ppc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm-ppc@vger.kernel.org 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 --- 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