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

From: Jakub Kicinski

Date: Wed May 13 2026 - 14:04:37 EST


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?
--
pw-bot: cr