From: Qingfang Deng <dqfext@gmail.com>
To: David Yang <mmyangfl@gmail.com>
Cc: netdev@vger.kernel.org, Andrew Lunn <andrew@lunn.ch>,
Vladimir Oltean <olteanv@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v3 2/2] net: dsa: yt921x: Protect MIB stats with a lock
Date: Mon, 5 Jan 2026 10:51:39 +0800 [thread overview]
Message-ID: <20260105025139.2348-1-dqfext@gmail.com> (raw)
In-Reply-To: <20260105020905.3522484-3-mmyangfl@gmail.com>
Hi David,
On Mon, 5 Jan 2026 10:09:01 +0800, David Yang wrote:
> 64bit variables might not be atomic on 32bit architectures, thus cannot
> be made lock-free. Protect them with a spin lock since get_stats64()
> cannot sleep.
Synchronizing both reads and updates with a spin lock is an overkill.
See include/linux/u64_stats_sync.h for a better approach.
-- Qingfang
next prev parent reply other threads:[~2026-01-05 2:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-05 2:08 [PATCH net-next v3 0/2] net: dsa: yt921x: Fix MIB overflow wraparound routine David Yang
2026-01-05 2:09 ` [PATCH net-next v3 1/2] " David Yang
2026-01-05 2:09 ` [PATCH net-next v3 2/2] net: dsa: yt921x: Protect MIB stats with a lock David Yang
2026-01-05 2:51 ` Qingfang Deng [this message]
2026-01-05 23:37 ` Jakub Kicinski
2026-01-06 1:33 ` Jakub Kicinski
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=20260105025139.2348-1-dqfext@gmail.com \
--to=dqfext@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mmyangfl@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.