netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net 0/2] rfs: annotate lockless accesses
@ 2023-06-02 16:31 Eric Dumazet
  2023-06-02 16:31 ` [PATCH net 1/2] rfs: annotate lockless accesses to sk->sk_rxhash Eric Dumazet
  2023-06-02 16:31 ` [PATCH net 2/2] rfs: annotate lockless accesses to RFS sock flow table Eric Dumazet
  0 siblings, 2 replies; 9+ messages in thread
From: Eric Dumazet @ 2023-06-02 16:31 UTC (permalink / raw)
  To: David S . Miller, Jakub Kicinski, Paolo Abeni
  Cc: netdev, eric.dumazet, Eric Dumazet

rfs runs without locks held, so we should annotate
read and writes to shared variables.

It should prevent compilers forcing writes
in the following situation:

  if (var != val)
     var = val;

A compiler could indeed simply avoid the conditional:

    var = val;

This matters if var is shared between many cpus.

Eric Dumazet (2):
  rfs: annotate lockless accesses to sk->sk_rxhash
  rfs: annotate lockless accesses to RFS sock flow table

 include/linux/netdevice.h |  7 +++++--
 include/net/sock.h        | 18 +++++++++++++-----
 net/core/dev.c            |  6 ++++--
 3 files changed, 22 insertions(+), 9 deletions(-)

-- 
2.41.0.rc0.172.g3f132b7071-goog


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-06-06  9:44 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-02 16:31 [PATCH net 0/2] rfs: annotate lockless accesses Eric Dumazet
2023-06-02 16:31 ` [PATCH net 1/2] rfs: annotate lockless accesses to sk->sk_rxhash Eric Dumazet
2023-06-02 20:20   ` Kuniyuki Iwashima
2023-06-05 22:52   ` Jakub Kicinski
2023-06-06  7:30     ` Eric Dumazet
2023-06-06  7:43       ` Eric Dumazet
2023-06-06  9:44       ` Simon Horman
2023-06-02 16:31 ` [PATCH net 2/2] rfs: annotate lockless accesses to RFS sock flow table Eric Dumazet
2023-06-02 20:27   ` Kuniyuki Iwashima

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).