Skip to contentSkip to conversation

typo, doc, simple fixes and some optimizations

PATCH In review Honnappa Nagarahalli 2 participants 14 messages Oct 8, 2019 – Oct 21, 2019

lore
Share & tools
lore
#0 lore raw

cover typo, doc, simple fixes and some optimizations

Few typo fixes, some corrections to the documentation and simple fixes to the test cases.

The last 2 commits contain simple optimizations with good amount of performance improvements.

v2:
All instances of size_t fixed (Ruifeng)

Honnappa Nagarahalli (7):
doc/rcu: fix typos
doc/rcu: correct the limitation on number of threads doc/rcu: add information about storing token and resource test/rcu: use size_t instead of int
test/rcu: use correct nomenclature while printing results lib/rcu: add least acknowledged token optimization lib/rcu: update QS only when there are updates from writer

 app/test/test_rcu_qsbr.c          |  4 +--
 app/test/test_rcu_qsbr_perf.c     | 27 ++++++++++-------
 doc/guides/prog_guide/rcu_lib.rst | 36 ++++++++++++----------
 lib/librte_rcu/rte_rcu_qsbr.c     |  4 +++
 lib/librte_rcu/rte_rcu_qsbr.h     | 50 +++++++++++++++++++++++++++++--
 5 files changed, 89 insertions(+), 32 deletions(-)
Signature · 1 line
2.17.1
#1 lore raw

PATCH v2 1/7 doc/rcu: fix typos

Fix typos.

Fixes 64994b56cfd7 ("rcu: add RCU library supporting QSBR mechanism")
---
 doc/guides/prog_guide/rcu_lib.rst | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)
doc/guides/prog_guide/rcu_lib.rst +12 -12
index 8fe5b1f73..c019dfca8 100644
@@ -37,8 +37,8 @@ What is Quiescent State
 -----------------------
 
 Quiescent State can be defined as "any point in the thread execution where the
-thread does not hold a reference to shared memory". It is up to the application
-to determine its quiescent state.
+thread does not hold a reference to shared memory". It is the responsibility of
+the application to determine its quiescent state.
 
 Let us consider the following diagram:
 
@@ -76,7 +76,7 @@ Factors affecting the RCU mechanism
 
 It is important to make sure that this library keeps the overhead of
 identifying the end of grace period and subsequent freeing of memory,
-to a minimum. The following explains how grace period and critical
+to a minimum. The following paras explain how grace period and critical
 section affect this overhead.
 
 The writer has to poll the readers to identify the end of grace period.
@@ -91,14 +91,14 @@ critical sections smaller requires additional CPU cycles (due to additional
 reporting) in the readers.
 
 Hence, we need the characteristics of a small grace period and large critical
-section. This library addresses this by allowing the writer to do
-other work without having to block until the readers report their quiescent
-state.
+section. This library addresses these characteristics by allowing the writer
+to do other work without having to block until the readers report their
+quiescent state.
 
 RCU in DPDK
 -----------
 
-For DPDK applications, the start and end of a ``while(1)`` loop (where no
+For DPDK applications, the beginning and end of a ``while(1)`` loop (where no
 references to shared data structures are kept) act as perfect quiescent
 states. This will combine all the shared data structure accesses into a
 single, large critical section which helps keep the overhead on the
@@ -106,11 +106,11 @@ reader side to a minimum.
 
 DPDK supports a pipeline model of packet processing and service cores.
 In these use cases, a given data structure may not be used by all the
-workers in the application. The writer does not have to wait for all
-the workers to report their quiescent state. To provide the required
-flexibility, this library has a concept of a QS variable. The application
-can create one QS variable per data structure to help it track the
-end of grace period for each data structure. This helps keep the grace
+workers in the application. The writer has to wait only for the workers that
+use the data structure to report their quiescent state. To provide the required
+flexibility, this library has a concept of a QS variable. If required, the
+application can create one QS variable per data structure to help it track the
+end of grace period for each data structure. This helps keep the length of grace
 period to a minimum.
 
 How to use this library
Signature · 1 line
2.17.1
#2 lore raw

PATCH v2 2/7 doc/rcu: correct the limitation on number of threads

In reply to Honnappa Nagarahalli

There is no limitation of 1024 reader threads.

Fixes 64994b56cfd7 ("rcu: add RCU library supporting QSBR mechanism")
---
 doc/guides/prog_guide/rcu_lib.rst | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
doc/guides/prog_guide/rcu_lib.rst +1 -2
index c019dfca8..4d1ed3954 100644
@@ -120,8 +120,7 @@ The application must allocate memory and initialize a QS variable.
 
 Applications can call ``rte_rcu_qsbr_get_memsize()`` to calculate the size
 of memory to allocate. This API takes a maximum number of reader threads,
-using this variable, as a parameter. Currently, a maximum of 1024 threads
-are supported.
+using this variable, as a parameter.
 
 Further, the application can initialize a QS variable using the API
 ``rte_rcu_qsbr_init()``.
Signature · 1 line
2.17.1
#3 lore raw

PATCH v2 3/7 doc/rcu: add information about storing token and resource

In reply to Honnappa Nagarahalli

After calling rte_rcu_qsbr_start API, the token and the deleted resource need to be stored for subsequent query/free.

Fixes 64994b56cfd7 ("rcu: add RCU library supporting QSBR mechanism")
---
 doc/guides/prog_guide/rcu_lib.rst | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
doc/guides/prog_guide/rcu_lib.rst +7 -2
index 4d1ed3954..8d0dfcf29 100644
@@ -162,14 +162,19 @@ running as worker threads.
 The separation of triggering the reporting from querying the status provides
 the writer threads flexibility to do useful work instead of blocking for the
 reader threads to enter the quiescent state or go offline. This reduces the
-memory accesses due to continuous polling for the status.
+memory accesses due to continuous polling for the status. But, since the
+resource is freed at a later time, the token and the reference to the deleted
+resource need to be stored for later queries.
 
 The ``rte_rcu_qsbr_synchronize()`` API combines the functionality of
 ``rte_rcu_qsbr_start()`` and blocking ``rte_rcu_qsbr_check()`` into a single
 API. This API triggers the reader threads to report their quiescent state and
 polls till all the readers enter the quiescent state or go offline. This API
 does not allow the writer to do useful work while waiting and introduces
-additional memory accesses due to continuous polling.
+additional memory accesses due to continuous polling. However, the application
+does not have to store the token or the reference to the deleted resource. The
+resource can be freed immediately after ``rte_rcu_qsbr_synchronize()`` API
+returns.
 
 The reader thread must call ``rte_rcu_qsbr_thread_offline()`` and
 ``rte_rcu_qsbr_thread_unregister()`` APIs to remove itself from reporting its
Signature · 1 line
2.17.1
#4 lore raw

PATCH v2 4/7 test/rcu: use size_t instead of int

In reply to Honnappa Nagarahalli

Variables used to store the return value of rte_rcu_qsbr_get_memsize in variables of type 'int'. The variables are of type 'size_t' now.

Fixes b87089b0bb19 ("test/rcu: add API and functional tests")
---
 app/test/test_rcu_qsbr.c      |  4 ++--
 app/test/test_rcu_qsbr_perf.c | 11 ++++++-----
 2 files changed, 8 insertions(+), 7 deletions(-)
app/test/test_rcu_qsbr.c +2 -2
index d1b9e46a2..2f71ec6ad 100644
@@ -52,7 +52,7 @@ static int
 alloc_rcu(void)
 {
 	int i;
-	uint32_t sz;
+	size_t sz;
 
 	sz = rte_rcu_qsbr_get_memsize(RTE_MAX_LCORE);
 
@@ -81,7 +81,7 @@ free_rcu(void)
 static int
 test_rcu_qsbr_get_memsize(void)
 {
-	uint32_t sz;
+	size_t sz;
 
 	printf("\nTest rte_rcu_qsbr_thread_register()\n");
 
app/test/test_rcu_qsbr_perf.c +6 -5
index cb2d177b7..280f1811f 100644
@@ -125,7 +125,7 @@ test_rcu_qsbr_writer_perf(void *arg)
 static int
 test_rcu_qsbr_perf(void)
 {
-	int sz;
+	size_t sz;
 	unsigned int i, tmp_num_cores;
 
 	writer_done = 0;
@@ -188,7 +188,7 @@ test_rcu_qsbr_perf(void)
 static int
 test_rcu_qsbr_rperf(void)
 {
-	int sz;
+	size_t sz;
 	unsigned int i, tmp_num_cores;
 
 	rte_atomic64_clear(&updates);
@@ -234,7 +234,7 @@ test_rcu_qsbr_rperf(void)
 static int
 test_rcu_qsbr_wperf(void)
 {
-	int sz;
+	size_t sz;
 	unsigned int i;
 
 	rte_atomic64_clear(&checks);
@@ -379,7 +379,7 @@ static int
 test_rcu_qsbr_sw_sv_1qs(void)
 {
 	uint64_t token, begin, cycles;
-	int sz;
+	size_t sz;
 	unsigned int i, j, tmp_num_cores;
 	int32_t pos;
 
@@ -498,7 +498,8 @@ static int
 test_rcu_qsbr_sw_sv_1qs_non_blocking(void)
 {
 	uint64_t token, begin, cycles;
-	int ret, sz;
+	int ret;
+	size_t sz;
 	unsigned int i, j, tmp_num_cores;
 	int32_t pos;
 
Signature · 1 line
2.17.1
#5 lore raw

Re: [dpdk-dev] [PATCH v2 4/7] test/rcu: use size_t instead of int

Quoted 3 lines · Honnappa Nagarahalli

Variables used to store the return value of rte_rcu_qsbr_get_memsize in variables of type 'int'. The variables are of type 'size_t' now.

Added a comment on the two cases we have here: the uint32_t storage are fine while the int ones were an issue.

Quoted 84 lines
Fixes b87089b0bb19 ("test/rcu: add API and functional tests")
---
 app/test/test_rcu_qsbr.c      |  4 ++--
 app/test/test_rcu_qsbr_perf.c | 11 ++++++-----
 2 files changed, 8 insertions(+), 7 deletions(-)
app/test/test_rcu_qsbr.c +2 -2
index d1b9e46a2..2f71ec6ad 100644
@@ -52,7 +52,7 @@ static int
 alloc_rcu(void)
 {
        int i;
-       uint32_t sz;
+       size_t sz;
 
        sz = rte_rcu_qsbr_get_memsize(RTE_MAX_LCORE);
 
@@ -81,7 +81,7 @@ free_rcu(void)
 static int
 test_rcu_qsbr_get_memsize(void)
 {
-       uint32_t sz;
+       size_t sz;
 
        printf("\nTest rte_rcu_qsbr_thread_register()\n");
 
app/test/test_rcu_qsbr_perf.c +6 -6
index cb2d177b7..280f1811f 100644
@@ -125,7 +125,7 @@ test_rcu_qsbr_writer_perf(void *arg)
 static int
 test_rcu_qsbr_perf(void)
 {
-       int sz;
+       size_t sz;
        unsigned int i, tmp_num_cores;
 
        writer_done = 0;
@@ -188,7 +188,7 @@ test_rcu_qsbr_perf(void)
 static int
 test_rcu_qsbr_rperf(void)
 {
-       int sz;
+       size_t sz;
        unsigned int i, tmp_num_cores;
 
        rte_atomic64_clear(&updates);
@@ -234,7 +234,7 @@ test_rcu_qsbr_rperf(void)
 static int
 test_rcu_qsbr_wperf(void)
 {
-       int sz;
+       size_t sz;
        unsigned int i;
 
        rte_atomic64_clear(&checks);
@@ -379,7 +379,7 @@ static int
 test_rcu_qsbr_sw_sv_1qs(void)
 {
        uint64_t token, begin, cycles;
-       int sz;
+       size_t sz;
        unsigned int i, j, tmp_num_cores;
        int32_t pos;
 
@@ -498,7 +498,8 @@ static int
 test_rcu_qsbr_sw_sv_1qs_non_blocking(void)
 {
        uint64_t token, begin, cycles;
-       int ret, sz;
+       int ret;
+       size_t sz;
        unsigned int i, j, tmp_num_cores;
        int32_t pos;
 
--
Quoted 2 lines

2.17.1

--
David Marchand

#6 lore raw

PATCH v2 5/7 test/rcu: use correct nomenclature while printing results

In reply to Honnappa Nagarahalli

Use 'quiescent state updates' instead of just 'updates'.

---
 app/test/test_rcu_qsbr_perf.c | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)
app/test/test_rcu_qsbr_perf.c +10 -6
index 280f1811f..d35a6d089 100644
@@ -167,8 +167,10 @@ test_rcu_qsbr_perf(void)
 	/* Wait until all readers have exited */
 	rte_eal_mp_wait_lcore();
 
-	printf("Total RCU updates = %"PRIi64"\n", rte_atomic64_read(&updates));
-	printf("Cycles per %d updates: %"PRIi64"\n", RCU_SCALE_DOWN,
+	printf("Total quiescent state updates = %"PRIi64"\n",
+		rte_atomic64_read(&updates));
+	printf("Cycles per %d quiescent state updates: %"PRIi64"\n",
+		RCU_SCALE_DOWN,
 		rte_atomic64_read(&update_cycles) /
 		(rte_atomic64_read(&updates) / RCU_SCALE_DOWN));
 	printf("Total RCU checks = %"PRIi64"\n", rte_atomic64_read(&checks));
@@ -217,8 +219,10 @@ test_rcu_qsbr_rperf(void)
 	/* Wait until all readers have exited */
 	rte_eal_mp_wait_lcore();
 
-	printf("Total RCU updates = %"PRIi64"\n", rte_atomic64_read(&updates));
-	printf("Cycles per %d updates: %"PRIi64"\n", RCU_SCALE_DOWN,
+	printf("Total quiescent state updates = %"PRIi64"\n",
+		rte_atomic64_read(&updates));
+	printf("Cycles per %d quiescent state updates: %"PRIi64"\n",
+		RCU_SCALE_DOWN,
 		rte_atomic64_read(&update_cycles) /
 		(rte_atomic64_read(&updates) / RCU_SCALE_DOWN));
 
@@ -462,7 +466,7 @@ test_rcu_qsbr_sw_sv_1qs(void)
 	rte_free(keys);
 
 	printf("Following numbers include calls to rte_hash functions\n");
-	printf("Cycles per 1 update(online/update/offline): %"PRIi64"\n",
+	printf("Cycles per 1 quiescent state update(online/update/offline): %"PRIi64"\n",
 		rte_atomic64_read(&update_cycles) /
 		rte_atomic64_read(&updates));
 
@@ -578,7 +582,7 @@ test_rcu_qsbr_sw_sv_1qs_non_blocking(void)
 	rte_free(keys);
 
 	printf("Following numbers include calls to rte_hash functions\n");
-	printf("Cycles per 1 update(online/update/offline): %"PRIi64"\n",
+	printf("Cycles per 1 quiescent state update(online/update/offline): %"PRIi64"\n",
 		rte_atomic64_read(&update_cycles) /
 		rte_atomic64_read(&updates));
 
Signature · 1 line
2.17.1
#7 lore raw

PATCH v2 6/7 lib/rcu: add least acknowledged token optimization

In reply to Honnappa Nagarahalli

When the rte_rcu_qsbr_check API is called, it is possible to calculate the least valued token acknowledged by all the readers. When the API is called next time, the readers' token counters do not need to be scanned if the value of the token being queried is less than the last least token acknowledged. This avoids the cache line bounces between readers and writer.

Fixes 64994b56cfd7 ("rcu: add RCU library supporting QSBR mechanism")
---
 lib/librte_rcu/rte_rcu_qsbr.c |  4 ++++
 lib/librte_rcu/rte_rcu_qsbr.h | 42 +++++++++++++++++++++++++++++++++++
 2 files changed, 46 insertions(+)
lib/librte_rcu/rte_rcu_qsbr.c +4 -0
index ce7f93dd3..c9ca66aaa 100644
@@ -73,6 +73,7 @@ rte_rcu_qsbr_init(struct rte_rcu_qsbr *v, uint32_t max_threads)
 			__RTE_QSBR_THRID_ARRAY_ELM_SIZE) /
 			__RTE_QSBR_THRID_ARRAY_ELM_SIZE;
 	v->token = __RTE_QSBR_CNT_INIT;
+	v->acked_token = __RTE_QSBR_CNT_INIT - 1;
 
 	return 0;
 }
@@ -245,6 +246,9 @@ rte_rcu_qsbr_dump(FILE *f, struct rte_rcu_qsbr *v)
 	fprintf(f, "  Token = %"PRIu64"\n",
 			__atomic_load_n(&v->token, __ATOMIC_ACQUIRE));
 
+	fprintf(f, "  Least Acknowledged Token = %"PRIu64"\n",
+			__atomic_load_n(&v->acked_token, __ATOMIC_ACQUIRE));
+
 	fprintf(f, "Quiescent State Counts for readers:\n");
 	for (i = 0; i < v->num_elems; i++) {
 		bmap = __atomic_load_n(__RTE_QSBR_THRID_ARRAY_ELM(v, i),
lib/librte_rcu/rte_rcu_qsbr.h +42 -0

102 lines not on this page · raw message

Signature · 1 line
2.17.1
#8 lore raw

PATCH v2 7/7 lib/rcu: update QS only when there are updates from writer

In reply to Honnappa Nagarahalli

When the writer is checking the quiescent state status, it is not deleting any entries in the data structure. This means, the readers do not need to update their quiescent state during that period. Readers update the quiescent state only when there are updates available from the writer.

---
 lib/librte_rcu/rte_rcu_qsbr.h | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
lib/librte_rcu/rte_rcu_qsbr.h +5 -3
index 3f445ba6c..0d4664572 100644
@@ -456,12 +456,14 @@ rte_rcu_qsbr_quiescent(struct rte_rcu_qsbr *v, unsigned int thread_id)
 	 */
 	t = __atomic_load_n(&v->token, __ATOMIC_ACQUIRE);
 
-	/* Inform the writer that updates are visible to this reader.
+	/* Check if there are updates available from the writer.
+	 * Inform the writer that updates are visible to this reader.
 	 * Prior loads of the shared data structure should not move
 	 * beyond this store. Hence use store-release.
 	 */
-	__atomic_store_n(&v->qsbr_cnt[thread_id].cnt,
-			 t, __ATOMIC_RELEASE);
+	if (t != __atomic_load_n(&v->qsbr_cnt[thread_id].cnt, __ATOMIC_RELAXED))
+		__atomic_store_n(&v->qsbr_cnt[thread_id].cnt,
+					 t, __ATOMIC_RELEASE);
 
 	__RTE_RCU_DP_LOG(DEBUG, "%s: update: token = %"PRIu64", Thread ID = %d",
 		__func__, t, thread_id);
Signature · 1 line
2.17.1
#9 lore raw

PATCH 1/1 rcu: fix reference to offline function

In reply to Honnappa Nagarahalli
Fixes 64994b56cfd7 ("rcu: add RCU library supporting QSBR mechanism")

---
I intend to add this patch to this series.
Honnappa, can you review it please ?

---
 lib/librte_rcu/rte_rcu_qsbr.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
lib/librte_rcu/rte_rcu_qsbr.h +2 -2
index 0d46645..0b55859 100644
@@ -217,7 +217,7 @@ struct rte_rcu_qsbr {
  * call this API before calling rte_rcu_qsbr_quiescent. This can be called
  * during initialization or as part of the packet processing loop.
  *
- * The reader thread must call rte_rcu_thread_offline API, before
+ * The reader thread must call rte_rcu_qsbr_thread_offline API, before
  * calling any functions that block, to ensure that rte_rcu_qsbr_check
  * API does not wait indefinitely for the reader thread to update its QS.
  *
@@ -283,7 +283,7 @@ struct rte_rcu_qsbr {
  * This can be called during initialization or as part of the packet
  * processing loop.
  *
- * The reader thread must call rte_rcu_thread_offline API, before
+ * The reader thread must call rte_rcu_qsbr_thread_offline API, before
  * calling any functions that block, to ensure that rte_rcu_qsbr_check
  * API does not wait indefinitely for the reader thread to update its QS.
  *
Signature · 1 line
1.8.3.1
author Reviewed-by on v1 1/1
#10 lore raw

Re: [dpdk-dev] [PATCH] rcu: fix reference to offline function

<snip>

Quoted 37 lines

Subject: [PATCH] rcu: fix reference to offline function

Fixes 64994b56cfd7 ("rcu: add RCU library supporting QSBR mechanism")

---
I intend to add this patch to this series.
Honnappa, can you review it please ?

---
 lib/librte_rcu/rte_rcu_qsbr.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
lib/librte_rcu/rte_rcu_qsbr.h index renamed from lib/librte_rcu/rte_rcu_qsbr.h +0 -0

0d46645..0b55859 100644

lib/librte_rcu/rte_rcu_qsbr.h +2 -3
@@ -217,7 +217,7 @@ struct rte_rcu_qsbr {
  * call this API before calling rte_rcu_qsbr_quiescent. This can be called
  * during initialization or as part of the packet processing loop.
  *
- * The reader thread must call rte_rcu_thread_offline API, before
+ * The reader thread must call rte_rcu_qsbr_thread_offline API, before
  * calling any functions that block, to ensure that rte_rcu_qsbr_check
  * API does not wait indefinitely for the reader thread to update its QS.
  *
@@ -283,7 +283,7 @@ struct rte_rcu_qsbr {
  * This can be called during initialization or as part of the packet
  * processing loop.
  *
- * The reader thread must call rte_rcu_thread_offline API, before
+ * The reader thread must call rte_rcu_qsbr_thread_offline API, before
  * calling any functions that block, to ensure that rte_rcu_qsbr_check
  * API does not wait indefinitely for the reader thread to update its QS.
  *
--
Quoted 1 line

1.8.3.1

Thank you David.

#12 lore raw
In reply to Honnappa Nagarahalli
Quoted 6 lines · Honnappa Nagarahalli

Few typo fixes, some corrections to the documentation and simple fixes to the test cases.

The last 2 commits contain simple optimizations with good amount of performance improvements.

Do you have numbers to illustrate?

Quoted 4 lines

v2:
All instances of size_t fixed (Ruifeng)

Quoted 8 lines

Honnappa Nagarahalli (7):
doc/rcu: fix typos
doc/rcu: correct the limitation on number of threads doc/rcu: add information about storing token and resource test/rcu: use size_t instead of int
test/rcu: use correct nomenclature while printing results lib/rcu: add least acknowledged token optimization lib/rcu: update QS only when there are updates from writer

Series applied, thanks.

--
David Marchand

#13 lore raw

<snip>

Quoted 11 lines
Quoted 6 lines · Honnappa Nagarahalli

Few typo fixes, some corrections to the documentation and simple fixes to the test cases.

The last 2 commits contain simple optimizations with good amount of performance improvements.

Do you have numbers to illustrate?

Thanks David.
I do not have the numbers for 'least acknowledged token' optimization. The performance test case to test that requires a different design in the performance test cases with additional code. This additional code is nothing but the rte_rcu_qsbr_defer_xxx APIs I am working on. I will be able to publish the numbers with and without this optimization.

I have the performance numbers for the last patch.

Without the patch:
===============
Total RCU updates = 11205362514
Cycles per 1000 updates: 587
Total RCU checks = 20000000
Cycles per 1000 checks: 29946

Perf Test: 12 Readers
Total RCU updates = 1200000000
Cycles per 1000 updates: 425

Perf test: 12 Writers ('wait' in qsbr_check == false) Total RCU checks = 240000000
Cycles per 1000 checks: 319 <<<<<<<<<============== (see the improvement below)

Perf test: 1 writer, 12 readers, 1 QSBR variable, 1 QSBR Query, Blocking QSBR Check Following numbers include calls to rte_hash functions
Cycles per 1 update(online/update/offline): 5857
Cycles per 1 check(start, check): 5889

Perf test: 1 writer, 12 readers, 1 QSBR variable, 1 QSBR Query, Non-Blocking QSBR check Following numbers include calls to rte_hash functions
Cycles per 1 update(online/update/offline): 5859
Cycles per 1 check(start, check): 5891

With patch:
==========
Total RCU updates = 11075332503
Cycles per 1000 updates: 601
Total RCU checks = 20000000
Cycles per 1000 checks: 30265

Perf Test: 12 Readers
Total RCU updates = 1200000000
Cycles per 1000 updates: 425

Perf test: 12 Writers ('wait' in qsbr_check == false) Total RCU checks = 240000000
Cycles per 1000 checks: 79 <<<<================== (Improvement)

Perf test: 1 writer, 12 readers, 1 QSBR variable, 1 QSBR Query, Blocking QSBR Check Following numbers include calls to rte_hash functions
Cycles per 1 update(online/update/offline): 5847
Cycles per 1 check(start, check): 5897

Perf test: 1 writer, 12 readers, 1 QSBR variable, 1 QSBR Query, Non-Blocking QSBR check Following numbers include calls to rte_hash functions
Cycles per 1 update(online/update/offline): 5851
Cycles per 1 check(start, check): 5894

Quoted 19 lines
Quoted 5 lines

v2:
All instances of size_t fixed (Ruifeng)

Quoted 8 lines

Honnappa Nagarahalli (7):
doc/rcu: fix typos
doc/rcu: correct the limitation on number of threads doc/rcu: add information about storing token and resource test/rcu: use size_t instead of int
test/rcu: use correct nomenclature while printing results lib/rcu: add least acknowledged token optimization lib/rcu: update QS only when there are updates from writer

Series applied, thanks.

--
David Marchand