[PATCH] mempool: add cache guard to per-lcore debug statistics
Morten Brørup
mb at smartsharesystems.com
Mon Sep 4 11:10:20 CEST 2023
The per-lcore debug statistics, if enabled, are frequently written by
their individual lcores, so add a cache guard to prevent CPU cache
thrashing.
Depends-on: series-29415 ("clarify purpose of empty cache lines")
Signed-off-by: Morten Brørup <mb at smartsharesystems.com>
---
lib/mempool/rte_mempool.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/mempool/rte_mempool.h b/lib/mempool/rte_mempool.h
index a05b25d5b9..f70bf36080 100644
--- a/lib/mempool/rte_mempool.h
+++ b/lib/mempool/rte_mempool.h
@@ -78,6 +78,7 @@ struct rte_mempool_debug_stats {
uint64_t get_fail_objs; /**< Objects that failed to be allocated. */
uint64_t get_success_blks; /**< Successful allocation number of contiguous blocks. */
uint64_t get_fail_blks; /**< Failed allocation number of contiguous blocks. */
+ RTE_CACHE_GUARD;
} __rte_cache_aligned;
#endif
--
2.17.1
More information about the dev
mailing list