diff options
author | Pablo de Lara <pablo.de.lara.guarch@intel.com> | 2015-10-30 14:37:28 +0000 |
---|---|---|
committer | Thomas Monjalon <thomas.monjalon@6wind.com> | 2015-11-04 01:04:10 +0100 |
commit | 5915699153d788c5cb3c449635eca46f1da6f2fe (patch) | |
tree | cbafcb84db40795bf6f8744d8102ca51a81cd7ad /app | |
parent | 9fd0052ee6102618701d4bb2faf7bc8ed1b5c97d (diff) | |
download | dpdk-5915699153d788c5cb3c449635eca46f1da6f2fe.zip dpdk-5915699153d788c5cb3c449635eca46f1da6f2fe.tar.gz dpdk-5915699153d788c5cb3c449635eca46f1da6f2fe.tar.xz |
hash: fix scaling by reducing contention
If using multiple cores on a system with hardware transactional
memory support, thread scaling does not work, as there was a single
point in the hash library which is a bottleneck for all threads,
which is the "free_slots" ring, which stores all the indices of
the free slots in the table.
This patch fixes the problem, by creating a local cache per logical core,
which stores locally indices of free slots,
so most times, writer threads will not interfere each other.
Fixes: 48a399119619 ("hash: replace with cuckoo hash implementation")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Diffstat (limited to 'app')
-rw-r--r-- | app/test/test_hash_scaling.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/test/test_hash_scaling.c b/app/test/test_hash_scaling.c index 39602cb..744e5e3 100644 --- a/app/test/test_hash_scaling.c +++ b/app/test/test_hash_scaling.c @@ -133,6 +133,7 @@ test_hash_scaling(int locking_mode) .hash_func = rte_hash_crc, .hash_func_init_val = 0, .socket_id = rte_socket_id(), + .extra_flag = RTE_HASH_EXTRA_FLAGS_TRANS_MEM_SUPPORT }; struct rte_hash *handle; char name[RTE_HASH_NAMESIZE]; |