From patchwork Wed Oct 10 21:48:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wang, Yipeng1" X-Patchwork-Id: 46531 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 49A4F1B187; Thu, 11 Oct 2018 06:52:58 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 896031B183 for ; Thu, 11 Oct 2018 06:52:56 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Oct 2018 21:52:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,367,1534834800"; d="scan'208";a="77895190" Received: from skx-yipeng.jf.intel.com ([10.54.81.175]) by fmsmga008.fm.intel.com with ESMTP; 10 Oct 2018 21:52:54 -0700 From: Yipeng Wang To: bruce.richardson@intel.com Cc: stephen@networkplumber.org, dev@dpdk.org, yipeng1.wang@intel.com, honnappa.nagarahalli@arm.com, sameh.gobriel@intel.com Date: Wed, 10 Oct 2018 14:48:03 -0700 Message-Id: <1539208085-30756-2-git-send-email-yipeng1.wang@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1539208085-30756-1-git-send-email-yipeng1.wang@intel.com> References: <1539208085-30756-1-git-send-email-yipeng1.wang@intel.com> Subject: [dpdk-dev] [PATCH v1 1/3] hash: fix unnecessary pause X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" There is a rte_pause in hash table reset function. Since the loop is not a polling loop on shared data structure, the rte_pause is not needed. Fixes: b26473ff8f4a ("hash: add reset function") Cc: stable@dpdk.org Signed-off-by: Yipeng Wang --- lib/librte_hash/rte_cuckoo_hash.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/librte_hash/rte_cuckoo_hash.c b/lib/librte_hash/rte_cuckoo_hash.c index 750caf8..ea8107e 100644 --- a/lib/librte_hash/rte_cuckoo_hash.c +++ b/lib/librte_hash/rte_cuckoo_hash.c @@ -521,14 +521,14 @@ rte_hash_reset(struct rte_hash *h) /* clear the free ring */ while (rte_ring_dequeue(h->free_slots, &ptr) == 0) - rte_pause(); + continue; /* clear free extendable bucket ring and memory */ if (h->ext_table_support) { memset(h->buckets_ext, 0, h->num_buckets * sizeof(struct rte_hash_bucket)); while (rte_ring_dequeue(h->free_ext_bkts, &ptr) == 0) - rte_pause(); + continue; } /* Repopulate the free slots ring. Entry zero is reserved for key misses */