hash: separate lock-free and r/w lock lookup
authorHonnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Sat, 10 Nov 2018 18:55:34 +0000 (12:55 -0600)
committerThomas Monjalon <thomas@monjalon.net>
Tue, 13 Nov 2018 16:34:44 +0000 (17:34 +0100)
commit9eca8bd7a61cc3a0bd29e2ddd493915902bb98a5
tree9844a1ac3aacca63cac93ec198d6d60b74cb586c
parent49594a63147a994d9674b1f479d0107e70fe1cbc
hash: separate lock-free and r/w lock lookup

The lock-free algorithm has caused significant lookup
performance regression for certain use cases. The
regression is attributed to the use of non-relaxed
memory orderings. 2 versions of the lookup functions
are created. One that uses the RW lock and the one that
is lock-free. This restores the performance regression
caused for use cases that used RW lock version of the
lookup function.

Fixes: e605a1d36 ("hash: add lock-free r/w concurrency")

Suggested-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Ola Liljedahl <ola.liljedahl@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Tested-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
lib/librte_hash/rte_cuckoo_hash.c