[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAAVpQUDCKzHT3kqzsUOoi9iNx8edHEWzJqbwgjnuBu3GbAzxNQ@mail.gmail.com>
Date: Wed, 10 Sep 2025 16:05:34 -0700
From: Kuniyuki Iwashima <kuniyu@...gle.com>
To: Eric Dumazet <edumazet@...gle.com>
Cc: "David S . Miller" <davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>, Simon Horman <horms@...nel.org>,
Neal Cardwell <ncardwell@...gle.com>, Willem de Bruijn <willemb@...gle.com>, netdev@...r.kernel.org,
eric.dumazet@...il.com
Subject: Re: [PATCH net-next] net: use NUMA drop counters for softnet_data.dropped
On Tue, Sep 9, 2025 at 5:19 AM Eric Dumazet <edumazet@...gle.com> wrote:
>
> Hosts under DOS attack can suffer from false sharing
> in enqueue_to_backlog() : atomic_inc(&sd->dropped).
>
> This is because sd->dropped can be touched from many cpus,
> possibly residing on different NUMA nodes.
>
> Generalize the sk_drop_counters infrastucture
> added in commit c51613fa276f ("net: add sk->sk_drop_counters")
> and use it to replace softnet_data.dropped
> with NUMA friendly softnet_data.drop_counters.
>
> This adds 64 bytes per cpu, maybe more in the future
> if we increase the number of counters (currently 2)
> per 'struct numa_drop_counters'.
>
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@...gle.com>
Thanks!
Powered by blists - more mailing lists