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: 263899 X-Patchwork-Delegate: benh@kernel.crashing.org Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [IPv6:::1]) by ozlabs.org (Postfix) with ESMTP id DD5BF2C0158 for ; Thu, 1 Aug 2013 14:46:15 +1000 (EST) Received: from mail-pb0-f48.google.com (mail-pb0-f48.google.com [209.85.160.48]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 2C80E2C00C1 for ; Thu, 1 Aug 2013 14:44:53 +1000 (EST) Received: by mail-pb0-f48.google.com with SMTP id ma3so1606060pbc.21 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=h0/YfoTJDMQjKDfX6Hb2XbBOSApaWdOdIoAW01JGYvfYmq+GJVdee5Oi8fs7AR4Go3 8ZXKlFCzKgY4H6CE2EIrQJp8h7ezNq1oefu7DHY/tscVD7twBi0eeZKQxb9930cig4Fi ZCkQv+dLn66l6zVvZ5rJL9+b2wwNysVMEig7sXIe7C5d80AlnoOT0G/KdEDM/4ENEzIB myyKS8fX+PVxBuakfjNnVURH8iWTQrUo6iQcaHZV/M7GsTQtnQ0vyxwWAuOW7OPUWTuO Dx6s2FT6qgJan+M3V8TBxMxjM+AeJjM7qL/pLtYAzgyRAoFCKMMwfN+S+Z0gtj8MpSov 3KlQ== 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 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: ALoCoQnMDcccuK3QeIA+3mJyhrSTRtqr6wDgllA9cgj49DMhJY2/1Jj98EK2snqNeAd4pmgYritC Cc: kvm@vger.kernel.org, linux-doc@vger.kernel.org, Alexey Kardashevskiy , Alexander Graf , kvm-ppc@vger.kernel.org, linux-kernel@vger.kernel.org, Paul Mackerras X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" 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