netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kuniyuki Iwashima <kuniyu@google.com>
To: Eric Dumazet <edumazet@google.com>
Cc: "David S . Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	 Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
	netdev@vger.kernel.org,  eric.dumazet@gmail.com,
	Willem de Bruijn <willemb@google.com>
Subject: Re: [PATCH v2 net-next 5/5] inet: raw: add drop_counters to raw sockets
Date: Tue, 26 Aug 2025 22:34:29 -0700	[thread overview]
Message-ID: <CAAVpQUBVBQ63nMTYBwhUiBU2=tiyBdHE9cnnajEH2UpY7dc=mg@mail.gmail.com> (raw)
In-Reply-To: <20250826125031.1578842-6-edumazet@google.com>

On Tue, Aug 26, 2025 at 5:50 AM Eric Dumazet <edumazet@google.com> wrote:
>
> When a packet flood hits one or more RAW sockets, many cpus
> have to update sk->sk_drops.
>
> This slows down other cpus, because currently
> sk_drops is in sock_write_rx group.
>
> Add a socket_drop_counters structure to raw sockets.
>
> Using dedicated cache lines to hold drop counters
> makes sure that consumers no longer suffer from
> false sharing if/when producers only change sk->sk_drops.
>
> This adds 128 bytes per RAW socket.
>
> Signed-off-by: Eric Dumazet <edumazet@google.com>

Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>

Thank you, Eric !

  reply	other threads:[~2025-08-27  5:34 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-26 12:50 [PATCH v2 net-next 0/5] net: better drop accounting Eric Dumazet
2025-08-26 12:50 ` [PATCH v2 net-next 1/5] net: add sk_drops_read(), sk_drops_inc() and sk_drops_reset() helpers Eric Dumazet
2025-08-26 12:50 ` [PATCH v2 net-next 2/5] net: add sk_drops_skbadd() helper Eric Dumazet
2025-08-27  5:28   ` Kuniyuki Iwashima
2025-08-26 12:50 ` [PATCH v2 net-next 3/5] net: add sk->sk_drop_counters Eric Dumazet
2025-08-27  5:30   ` Kuniyuki Iwashima
2025-08-26 12:50 ` [PATCH v2 net-next 4/5] udp: add drop_counters to udp socket Eric Dumazet
2025-08-27  5:32   ` Kuniyuki Iwashima
2025-08-26 12:50 ` [PATCH v2 net-next 5/5] inet: raw: add drop_counters to raw sockets Eric Dumazet
2025-08-27  5:34   ` Kuniyuki Iwashima [this message]
2025-08-28 12:50 ` [PATCH v2 net-next 0/5] net: better drop accounting patchwork-bot+netdevbpf

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='CAAVpQUBVBQ63nMTYBwhUiBU2=tiyBdHE9cnnajEH2UpY7dc=mg@mail.gmail.com' \
    --to=kuniyu@google.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=eric.dumazet@gmail.com \
    --cc=horms@kernel.org \
    --cc=kuba@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;
as well as URLs for NNTP newsgroup(s).