Thread (10 messages) flat view 10 messages, 2 authors, 2d ago

Re: [PATCH net-next 3/4] net: dsa: motorcomm: Use u64_stats_t for MIB stats

From: David Yang <mmyangfl@gmail.com>
Date: 2026-09-04 02:58:44
Also in: lkml

On Fri, Sep 4, 2026 at 12:25 AM Andrew Lunn [off-list ref] wrote:
On Thu, Sep 03, 2026 at 10:35:08PM +0800, David Yang wrote:
quoted
64-bit variables might not be atomic on 32-bit architectures, and could
lead to load/store tearing. Use u64_stats_t to ensure consistency.
Can this patch also be broken up. It should be possible to use
u64_stats_read() without changing the locking? So one patch which only
does u64_stats_read(). You should then be able to add the syncp
code. And lastly the mutex changes. That then allows you to explain
why the mutex changes are safe in the commit message.

    Andrew
u64_stats_read are meant to be used with syncp. This sounds like an
incorrect partial patch, works only because of the internal
implementation of u64_stats_t.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help