]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: make softnet_data.dropped an atomic_t
authorEric Dumazet <edumazet@google.com>
Fri, 29 Mar 2024 15:42:21 +0000 (15:42 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 1 Apr 2024 10:28:32 +0000 (11:28 +0100)
commita7ae7b0b2ea014ff3ed4be812c3efa1b1d86e153
treea3f559c1b1381749fa4e444f8ee14a050b74001d
parent95e48d862ada73188be6d91a33c49d1712815bd2
net: make softnet_data.dropped an atomic_t

If under extreme cpu backlog pressure enqueue_to_backlog() has
to drop a packet, it could do this without dirtying a cache line
and potentially slowing down the target cpu.

Move sd->dropped into a separate cache line, and make it atomic.

In non pressure mode, this field is not touched, no need to consume
valuable space in a hot cache line.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/netdevice.h
net/core/dev.c
net/core/net-procfs.c