History

net-sysfs: use rps_tag_ptr and remove metadata from rps_dev_flow_table

Instead of storing the @log at the beginning of rps_dev_flow_table use 5 low order bits of the rps_tag_ptr to store the log of the size. This removes a potential cache line miss (for light traffic). This allows us to switch to one high-order allocation instead of vmalloc() when CONFIG_RFS_ACCEL is not set.

Eric Dumazet committed 8 months ago

Commit a4351631 parent b2cc6184 files · +67 −69Browse files

Showing the changes to include/net/netdev_rx_queue.h (1 of 4 files). Show all

Unified · Split

include/net/netdev_rx_queue.h+2−1
@@ -8,13 +8,14 @@ · 7 unmodified lines
88 #include <net/xdp.h>
99 #include <net/page_pool/types.h>
1010 #include <net/netdev_queues.h>
11+#include <net/rps-types.h>
1112
1213 /* This structure contains an instance of an RX queue. */
1314 struct netdev_rx_queue {
1415 struct xdp_rxq_info xdp_rxq;
1516 #ifdef CONFIG_RPS
1617 struct rps_map __rcu *rps_map;
17− struct rps_dev_flow_table __rcu *rps_flow_table;
18+ rps_tag_ptr rps_flow_table;
1819 #endif
1920 struct kobject kobj;
2021 const struct attribute_group **groups;