DPDK patches and discussions
 help / color / mirror / Atom feed
From: Yipeng Wang <yipeng1.wang@intel.com>
To: bruce.richardson@intel.com
Cc: stephen@networkplumber.org, dev@dpdk.org, yipeng1.wang@intel.com,
	honnappa.nagarahalli@arm.com, sameh.gobriel@intel.com
Subject: [dpdk-dev] [PATCH v1 1/3] hash: fix unnecessary pause
Date: Wed, 10 Oct 2018 14:48:03 -0700	[thread overview]
Message-ID: <1539208085-30756-2-git-send-email-yipeng1.wang@intel.com> (raw)
In-Reply-To: <1539208085-30756-1-git-send-email-yipeng1.wang@intel.com>

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 <yipeng1.wang@intel.com>
---
 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 */
-- 
2.7.4

  reply	other threads:[~2018-10-11  4:52 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-10 21:48 [dpdk-dev] [PATCH v1 0/3] Improvements over rte hash and tests Yipeng Wang
2018-10-10 21:48 ` Yipeng Wang [this message]
2018-10-10 21:48 ` [dpdk-dev] [PATCH v1 2/3] test/hash: change multiwriter test to use jhash Yipeng Wang
2018-10-11 11:27   ` Bruce Richardson
2018-10-10 21:48 ` [dpdk-dev] [PATCH v1 3/3] test/hash: add readwrite test for ext table Yipeng Wang
2018-10-24 20:36   ` Bruce Richardson
2018-10-25  1:06     ` Wang, Yipeng1
2018-10-26  0:23     ` Honnappa Nagarahalli
2018-10-26 10:12       ` Bruce Richardson
2018-10-29  5:54         ` Honnappa Nagarahalli
2018-10-31  4:21         ` Honnappa Nagarahalli
2018-11-01  4:54   ` [dpdk-dev] [PATCH 0/3] hash: deprecate lock ellision and read/write concurreny flags Honnappa Nagarahalli
2018-11-01  4:54     ` [dpdk-dev] [PATCH 1/3] " Honnappa Nagarahalli
2018-11-01  9:45       ` Bruce Richardson
2018-11-01  9:48         ` Bruce Richardson
2018-11-01 19:43         ` Honnappa Nagarahalli
2018-11-02 11:11           ` Bruce Richardson
2018-11-01 23:25       ` [dpdk-dev] [PATCH v2 0/4] " Honnappa Nagarahalli
2018-11-01 23:25         ` [dpdk-dev] [PATCH v2 1/4] hash: prepare for deprecation of flags Honnappa Nagarahalli
2018-11-02 11:14           ` Bruce Richardson
2018-11-01 23:25         ` [dpdk-dev] [PATCH v2 2/4] hash: deprecate lock ellision and read/write concurreny flags Honnappa Nagarahalli
2018-11-01 23:25         ` [dpdk-dev] [PATCH v2 3/4] test/hash: stop using " Honnappa Nagarahalli
2018-11-01 23:25         ` [dpdk-dev] [PATCH v2 4/4] doc/hash: deprecate " Honnappa Nagarahalli
2018-11-02 11:21           ` Bruce Richardson
2018-11-02 11:25         ` [dpdk-dev] [PATCH v2 0/4] hash: " Bruce Richardson
2018-11-02 17:38           ` Honnappa Nagarahalli
2018-12-20 20:10             ` Yigit, Ferruh
2018-11-01  4:54     ` [dpdk-dev] [PATCH 2/3] test/hash: stop using " Honnappa Nagarahalli
2018-11-01  4:54     ` [dpdk-dev] [PATCH 3/3] doc/hash: deprecate " Honnappa Nagarahalli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1539208085-30756-2-git-send-email-yipeng1.wang@intel.com \
    --to=yipeng1.wang@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=honnappa.nagarahalli@arm.com \
    --cc=sameh.gobriel@intel.com \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).