From patchwork Thu Jun 27 05:02:32 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Kardashevskiy X-Patchwork-Id: 254952 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 0089B2C0499 for ; Thu, 27 Jun 2013 15:05:13 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752401Ab3F0FDX (ORCPT ); Thu, 27 Jun 2013 01:03:23 -0400 Received: from mail-pb0-f43.google.com ([209.85.160.43]:61310 "EHLO mail-pb0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752384Ab3F0FDW (ORCPT ); Thu, 27 Jun 2013 01:03:22 -0400 Received: by mail-pb0-f43.google.com with SMTP id md12so392244pbc.2 for ; Wed, 26 Jun 2013 22:03:21 -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=IZhfQEdbW2zy1pijdq37RaB0CJFAvAN4M5dFTm+hKqM=; b=mkzc90nmyInnLqeQX/nBU2V2ptvJO2vife9IaPYd99b0DQYLP/9subk9P2agMQnx9I iwwwxNI90e52CasvbKhYik5tfRHMUPKgKWS5qeCilA3gguGgKGkHNkhE7hjcjRKkcdSm x9epXDEc4fh6dTbGrFLnbqkGp0KnXDiOGCvbG0yLwA/EcpQlVCJLt6XPEmFDCTmd178e IgWfOXjrMWLsTNdosJgI2wOyOc/bJYfd2XLlAoDkSzOHKHgj/AE1YW6gvzamrWP5Hcgn hZtoXCmRc/wa+PXtv/urGkLEtJ7thZExB45jx4XcKN1eXLn/7Tq1EpCruEna02aIz/sb XZag== X-Received: by 10.66.179.78 with SMTP id de14mr4073454pac.18.1372309401441; Wed, 26 Jun 2013 22:03:21 -0700 (PDT) Received: from ka1.ozlabs.ibm.com (ibmaus65.lnk.telstra.net. [165.228.126.9]) by mx.google.com with ESMTPSA id ve3sm1377120pbc.14.2013.06.26.22.03.15 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 26 Jun 2013 22:03:20 -0700 (PDT) From: Alexey Kardashevskiy To: linuxppc-dev@lists.ozlabs.org Cc: Alexey Kardashevskiy , David Gibson , Benjamin Herrenschmidt , Alexander Graf , Paul Mackerras , Alex Williamson , "Paul E . McKenney" , kvm@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, kvm-ppc@vger.kernel.org Subject: [PATCH 4/8] hashtable: add hash_for_each_possible_rcu_notrace() Date: Thu, 27 Jun 2013 15:02:32 +1000 Message-Id: <1372309356-28320-5-git-send-email-aik@ozlabs.ru> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1372309356-28320-1-git-send-email-aik@ozlabs.ru> References: <1372309356-28320-1-git-send-email-aik@ozlabs.ru> X-Gm-Message-State: ALoCoQmB3uKYWcl8pWd1ZxAZq+aKCpFFS8eSj9cJh9vPxBEvhmHtdeiEYI4OND8/dUMoeAXO7b1Q 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