[0/7] typo, doc, simple fixes and some optimizations

Message ID 20191008211220.31586-1-honnappa.nagarahalli@arm.com
Headers show
Series
  • typo, doc, simple fixes and some optimizations
Related show

Message

Honnappa Nagarahalli Oct. 8, 2019, 9:12 p.m.
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(-)

-- 
2.17.1

Comments

Honnappa Nagarahalli Oct. 18, 2019, 1:58 p.m. | #1
<snip>

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

> 

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

> Cc: stable@dpdk.org

> 

> Signed-off-by: David Marchand <david.marchand@redhat.com>

> ---

> 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(-)

> 

> diff --git a/lib/librte_rcu/rte_rcu_qsbr.h b/lib/librte_rcu/rte_rcu_qsbr.h index

> 0d46645..0b55859 100644

> --- a/lib/librte_rcu/rte_rcu_qsbr.h

> +++ b/lib/librte_rcu/rte_rcu_qsbr.h

> @@ -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.

>   *

> --

> 1.8.3.1

Thank you David.
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
David Marchand Oct. 21, 2019, 7:19 p.m. | #2
On Tue, Oct 8, 2019 at 11:12 PM Honnappa Nagarahalli
<honnappa.nagarahalli@arm.com> wrote:
>

> 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?

>

> 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


Series applied, thanks.


--
David Marchand
David Marchand Oct. 21, 2019, 7:25 p.m. | #3
On Fri, Oct 18, 2019 at 3:58 PM Honnappa Nagarahalli
<Honnappa.Nagarahalli@arm.com> wrote:
>

> <snip>

>

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

> >

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

> > Cc: stable@dpdk.org

> >

> > Signed-off-by: David Marchand <david.marchand@redhat.com>

> Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>

>


Applied.

-- 
David Marchand
Honnappa Nagarahalli Oct. 21, 2019, 7:39 p.m. | #4
<snip>

> 

> On Tue, Oct 8, 2019 at 11:12 PM Honnappa Nagarahalli

> <honnappa.nagarahalli@arm.com> wrote:

> >

> > 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

> 

> >

> > 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

> 

> Series applied, thanks.

> 

> 

> --

> David Marchand