From patchwork Wed Aug 28 08:37:39 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Kardashevskiy X-Patchwork-Id: 270405 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 AE0682C01B5 for ; Wed, 28 Aug 2013 18:43:49 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754649Ab3H1IiQ (ORCPT ); Wed, 28 Aug 2013 04:38:16 -0400 Received: from mail-pa0-f41.google.com ([209.85.220.41]:48485 "EHLO mail-pa0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752685Ab3H1IiM (ORCPT ); Wed, 28 Aug 2013 04:38:12 -0400 Received: by mail-pa0-f41.google.com with SMTP id bj1so5965399pad.14 for ; Wed, 28 Aug 2013 01:38:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=z1ZgyKJqGQFihMS+2uCkJE0JNG71cP/UdlBvmKh/TUs=; b=ftEVq9qv0aBNxWbClkJV9sdsut/twJrcNr2c77sDhWwDE00yc8uXApJFTZ9YvQ6Q0r 578316Ot4k7QiKXSTWF1Zllso1ZRaCE4XQJY7ewWcRaDop5aIjRDrNL+RLsMOiB4jPHV AacE+LHz0m+MTuCvfHw6oRFEolRXimDPXUzK2+hSysaJu+PmLPHbgfyNEZZ1730mGT67 nyBmxqxJUtyMquAqN5F5s2kJ4G08uWC+Mc/vCMTf34HDzGIIUJ+/Csr/RUL0m/RnGN5Y 15BtcNfPV6k4DdAxWud0z1KTeAjlMvuJYKVQKNcIjJjmtRaX0gNrt1kijQj3s+FZceId CDVw== X-Gm-Message-State: ALoCoQk8TP8ZSfOaqKs/ZvW4X+TOs7SAfa1INUPiZSpf+AbEzI/cTjaMKIIUnI9Ke3KMmy+IpMHQ X-Received: by 10.69.13.132 with SMTP id ey4mr26052634pbd.52.1377679091797; Wed, 28 Aug 2013 01:38:11 -0700 (PDT) Received: from ka1.ozlabs.ibm.com (ibmaus65.lnk.telstra.net. [165.228.126.9]) by mx.google.com with ESMTPSA id sb9sm20279902pbb.0.1969.12.31.16.00.00 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 28 Aug 2013 01:38:10 -0700 (PDT) From: Alexey Kardashevskiy To: linuxppc-dev@lists.ozlabs.org Cc: Alexey Kardashevskiy , David Gibson , Benjamin Herrenschmidt , Paul Mackerras , Gleb Natapov , Paolo Bonzini , Alexander Graf , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, kvm-ppc@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH v9 02/13] hashtable: add hash_for_each_possible_rcu_notrace() Date: Wed, 28 Aug 2013 18:37:39 +1000 Message-Id: <1377679070-3515-3-git-send-email-aik@ozlabs.ru> X-Mailer: git-send-email 1.8.4.rc4 In-Reply-To: <1377679070-3515-1-git-send-email-aik@ozlabs.ru> References: <1377679070-3515-1-git-send-email-aik@ozlabs.ru> 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 --- Changes: v8: * fixed warnings from check_patch.pl --- include/linux/hashtable.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/include/linux/hashtable.h b/include/linux/hashtable.h index a9df51f..519b6e2 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