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: 2836742 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id DBD5E9F7D6 for ; Thu, 1 Aug 2013 04:48:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 094E5201EC for ; Thu, 1 Aug 2013 04:48:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 348E3201E7 for ; Thu, 1 Aug 2013 04:48:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752382Ab3HAEoz (ORCPT ); Thu, 1 Aug 2013 00:44:55 -0400 Received: from mail-pd0-f174.google.com ([209.85.192.174]:45881 "EHLO mail-pd0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751980Ab3HAEow (ORCPT ); Thu, 1 Aug 2013 00:44:52 -0400 Received: by mail-pd0-f174.google.com with SMTP id 10so1564693pdc.19 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=AMHMosqpFEVe5EwWUeKyb5ItLGrjDmFjhH242gk9113U96p1ShcberwHalejPSTDt5 tZ//tZADD7Li/uSy6wte88HBgBk6XFb6sOl2E7TVofznXm506nZa+gg303L+EGilJ2hb 5LWHiezPvfgl5T8/GK3EzU1EjoktvXI1d5MV6k+dwKRMg1nvXyBtV8Qol5g0ljM279hA jlEiYV0x6J7aYcjsOhlhtkP3DTK9pgpXNlEhJqkEKX2zGx/Hs6tt47Q90DDTB8Um5hn7 7oJk6uzD6CDgAZUIro9dQiMkLy3+B1tb1cE6PQN1quBVR6fWZjbWV2lM2EXu9BAIgEBh RKxw== 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: ALoCoQlw3s54SaD4JToF0jw3eIUbRZSHq8pSMJw4hjxcJp72BtkfM/WnYH/G8nAtmAV3+K9ceJh9 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Spam-Status: No, score=-8.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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