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: 270392 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 B07FD2C03B3 for ; Wed, 28 Aug 2013 18:40:07 +1000 (EST) Received: from mail-pb0-f44.google.com (mail-pb0-f44.google.com [209.85.160.44]) (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 08E322C00F9 for ; Wed, 28 Aug 2013 18:38:13 +1000 (EST) Received: by mail-pb0-f44.google.com with SMTP id xa7so5989225pbc.3 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=cB1/mPzlThZmdAxZuJWr9lE4HZQLeJsEoauLPeQPxhY5F9Kf4mp+ZI2Coe4VdEafuH YezrjkXj8uz1MdTXnB7c3oOmRJbxNWe10zDLMBcaTCgNZIDlcYAp+si+TkcEeltdIG0Y 46QwRnnWw+V70gTTiC6gDN6/qhFDneVoNH6oflq+Ho2V9eOBwaHyOxMiASEuQ9Dym7YG 3XQbrfMCi6tTSp26fZKUHy2y0Mzd+WMKMKhLIG2/3Musk3tLyx3ocRRBgq9b4IlOQJXx bal2WhRaNoxfRo5bh1pD8tUnebgzdc2dSTZGv0A0pkr0aVZ+r49UrbeDWaCp8FruCbKn 4EhA== X-Gm-Message-State: ALoCoQkkqg5L58l3pGicoz4YZIPo7hnlImLm37GrmazjeVHBr2Ua6ZOrSCJs69SRnIh0X1cNoEIV 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 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> Cc: kvm@vger.kernel.org, Gleb Natapov , Alexey Kardashevskiy , Alexander Graf , kvm-ppc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Paul Mackerras , Paolo Bonzini , David Gibson X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.16rc2 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 --- 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