Netdev List
 help / color / mirror / Atom feed
From: Daniel Zahka <daniel.zahka@gmail.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>,
	Willem de Bruijn <willemb@google.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net 3/3] netdevsim: psp: serialize psp stats writers
Date: Wed, 13 May 2026 14:05:34 -0400	[thread overview]
Message-ID: <fbd9e682-9525-4e3c-ab1d-0f5fc483a4fc@gmail.com> (raw)
In-Reply-To: <20260513110346.35c8accf@kernel.org>


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.


      reply	other threads:[~2026-05-13 18:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-13 12:59 [PATCH net 0/3] netdevsim: psp: fix issues with stats collection Daniel Zahka
2026-05-13 12:59 ` [PATCH net 1/3] netdevsim: psp: initialize stats syncp before use Daniel Zahka
2026-05-13 12:59 ` [PATCH net 2/3] netdevsim: psp: update rx stats on the peer netdevsim Daniel Zahka
2026-05-13 12:59 ` [PATCH net 3/3] netdevsim: psp: serialize psp stats writers Daniel Zahka
2026-05-13 18:03   ` Jakub Kicinski
2026-05-13 18:05     ` Daniel Zahka [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fbd9e682-9525-4e3c-ab1d-0f5fc483a4fc@gmail.com \
    --to=daniel.zahka@gmail.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=willemb@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox