rcu: add least acknowledged token optimization
authorHonnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Tue, 8 Oct 2019 21:12:19 +0000 (16:12 -0500)
committerDavid Marchand <david.marchand@redhat.com>
Mon, 21 Oct 2019 15:54:40 +0000 (17:54 +0200)
commit1f90d32ce1756bfd26da913940e3ac38153c6e9a
tree5e6f7cbf06514c860f36b598302fecbdc44338bf
parentd0487bba14595ddc9c026a0364df464ab3136df5
rcu: add least acknowledged token optimization

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")
Cc: stable@dpdk.org
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
lib/librte_rcu/rte_rcu_qsbr.c
lib/librte_rcu/rte_rcu_qsbr.h