From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yipeng Wang Subject: [PATCH v4 1/6] hash: fix unnecessary pause Date: Fri, 26 Oct 2018 02:53:41 -0700 Message-ID: <1540547626-197189-2-git-send-email-yipeng1.wang@intel.com> References: <1540494678-64299-1-git-send-email-yipeng1.wang@intel.com> <1540547626-197189-1-git-send-email-yipeng1.wang@intel.com> Cc: stephen@networkplumber.org, dev@dpdk.org, yipeng1.wang@intel.com, honnappa.nagarahalli@arm.com, sameh.gobriel@intel.com To: bruce.richardson@intel.com Return-path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 3660C2E81 for ; Fri, 26 Oct 2018 18:59:10 +0200 (CEST) In-Reply-To: <1540547626-197189-1-git-send-email-yipeng1.wang@intel.com> 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 Acked-by: Bruce Richardson --- lib/librte_hash/rte_cuckoo_hash.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/librte_hash/rte_cuckoo_hash.c b/lib/librte_hash/rte_cuckoo_hash.c index 0648a22..5ddcccd 100644 --- a/lib/librte_hash/rte_cuckoo_hash.c +++ b/lib/librte_hash/rte_cuckoo_hash.c @@ -27,7 +27,6 @@ #include #include #include -#include #include "rte_hash.h" #include "rte_cuckoo_hash.h" @@ -574,14 +573,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 */ -- 2.7.4