Skip to content

Commit

Permalink
net: rps: move received_rps field to a better location
Browse files Browse the repository at this point in the history
Commit 14d898f ("dev: Move received_rps counter next
to RPS members in softnet data") was unfortunate:

received_rps is dirtied by a cpu and never read by other
cpus in fast path.

Its presence in the hot RPS cache line (shared by many cpus)
is hurting RPS/RFS performance.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Apr 1, 2024
1 parent c62fdf5 commit d3ae5f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/linux/netdevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -3204,6 +3204,7 @@ struct softnet_data {
struct softnet_data *rps_ipi_list;
#endif

unsigned int received_rps;
bool in_net_rx_action;
bool in_napi_threaded_poll;

Expand Down Expand Up @@ -3236,7 +3237,6 @@ struct softnet_data {
unsigned int cpu;
unsigned int input_queue_tail;
#endif
unsigned int received_rps;
struct sk_buff_head input_pkt_queue;
struct napi_struct backlog;

Expand Down

0 comments on commit d3ae5f4

Please sign in to comment.