[PATCH v2 1/6] test: add pause to synchronization spinloops

Bruce Richardson bruce.richardson at intel.com
Wed Jan 21 17:10:28 CET 2026


On Mon, Jan 19, 2026 at 05:55:04PM -0800, Stephen Hemminger wrote:
> The atomic and thread tests use tight spinloops to synchronize.
> These spinloops lack rte_pause() which causes problems on high core
> count systems, particularly AMD Zen architectures where:
> 
> - Tight spinloops without pause can starve SMT sibling threads
> - Memory ordering and store-buffer forwarding behave differently
> - Higher core counts amplify timing windows for race conditions
> 
> This manifests as sporadic test failures on systems with 32+ cores
> that don't reproduce on smaller core count systems.
> 
> Add rte_pause() to all seven synchronization spinloops to allow
> proper CPU resource sharing and improve memory ordering behavior.
> 
> Fixes: af75078fece3 ("first public release")
> Cc: stable at dpdk.org
> 
> Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
> ---
>  app/test/test_atomic.c  | 15 ++++++++-------
>  app/test/test_threads.c | 17 +++++++++--------
>  2 files changed, 17 insertions(+), 15 deletions(-)
> 
Acked-by: Bruce Richardson <bruce.richardson at intel.com>



More information about the stable mailing list