diff options
author | Eric Dumazet <edumazet@google.com> | 2024-03-29 16:42:21 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2024-04-01 12:28:32 +0200 |
commit | a7ae7b0b2ea014ff3ed4be812c3efa1b1d86e153 (patch) | |
tree | a3f559c1b1381749fa4e444f8ee14a050b74001d /net/core/net-procfs.c | |
parent | net: enqueue_to_backlog() change vs not running device (diff) | |
download | linux-a7ae7b0b2ea014ff3ed4be812c3efa1b1d86e153.tar.xz linux-a7ae7b0b2ea014ff3ed4be812c3efa1b1d86e153.zip |
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>
Diffstat (limited to '')
-rw-r--r-- | net/core/net-procfs.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/core/net-procfs.c b/net/core/net-procfs.c index a97eceb84e61..fa6d3969734a 100644 --- a/net/core/net-procfs.c +++ b/net/core/net-procfs.c @@ -144,7 +144,8 @@ static int softnet_seq_show(struct seq_file *seq, void *v) seq_printf(seq, "%08x %08x %08x %08x %08x %08x %08x %08x %08x %08x %08x %08x %08x " "%08x %08x\n", - sd->processed, sd->dropped, sd->time_squeeze, 0, + sd->processed, atomic_read(&sd->dropped), + sd->time_squeeze, 0, 0, 0, 0, 0, /* was fastroute */ 0, /* was cpu_collision */ sd->received_rps, flow_limit_count, |