Re: [PATCH net 3/3] netdevsim: psp: serialize psp stats writers

From: Daniel Zahka

Date: Wed May 13 2026 - 14:12:58 EST



On 5/13/26 2:03 PM, Jakub Kicinski wrote:
On Wed, 13 May 2026 05:59:38 -0700 Daniel Zahka wrote:
The u64_stats_* api requires mutual exclusion on writers. The simplest
way to do this is just to add a spinlock to the writer path, rather
than making the stats per queue.

Synchronization of the reader and writer paths use the
u64_stats_update_begin() api and does not require any fixes.
The spin lock makes the use of u64_stats_t a bit pointless.
Let's switch to atomic_long instead?


Makes sense. I'll repost the series.