net/mlx5: add per-lcore cache to the list utility
authorMatan Azrad <matan@nvidia.com>
Tue, 13 Jul 2021 08:44:42 +0000 (11:44 +0300)
committerRaslan Darawsheh <rasland@nvidia.com>
Thu, 15 Jul 2021 13:19:10 +0000 (15:19 +0200)
commit491b7137ff774bf0cbb8a1e8aff3d5d130c8f046
treec8081c0d566c5a2f8733a092ddd040b0e6e16345
parente78e5408da89b6e297e84b305b698d262cd5443a
net/mlx5: add per-lcore cache to the list utility

When mlx5 list object is accessed by multiple cores, the list lock
counter is all the time written by all the cores what increases cache
misses in the memory caches.

In addition, when one thread accesses the list for add\remove\lookup
operation, all the other threads coming to do an operation in the list
are stuck in the lock.

Add per lcore cache to allow thread manipulations to be lockless when
the list objects are mostly reused.

Synchronization with atomic operations should be done in order to
allow threads to unregister an entry from other thread cache.

Signed-off-by: Matan Azrad <matan@nvidia.com>
Acked-by: Suanming Mou <suanmingm@nvidia.com>
drivers/net/mlx5/linux/mlx5_os.c
drivers/net/mlx5/mlx5.h
drivers/net/mlx5/mlx5_flow.h
drivers/net/mlx5/mlx5_flow_dv.c
drivers/net/mlx5/mlx5_rx.h
drivers/net/mlx5/mlx5_rxq.c
drivers/net/mlx5/mlx5_utils.c
drivers/net/mlx5/mlx5_utils.h
drivers/net/mlx5/windows/mlx5_os.c