]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net-sysfs: use rps_tag_ptr and remove metadata from rps_sock_flow_table
authorEric Dumazet <edumazet@google.com>
Mon, 2 Mar 2026 18:14:29 +0000 (18:14 +0000)
committerJakub Kicinski <kuba@kernel.org>
Thu, 5 Mar 2026 00:54:09 +0000 (16:54 -0800)
commitdd378109d20ff6789091fa3558607c1d242d80ad
tree45595854374fd90b3474ed54673e5b18b1683672
parent9cde131cdd888873363b5d9dfd8d4d4c1fae6986
net-sysfs: use rps_tag_ptr and remove metadata from rps_sock_flow_table

Instead of storing the @mask at the beginning of rps_sock_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 to fetch @mask.

More importantly, we can switch to vmalloc_huge() without wasting memory.

Tested with:

numactl --interleave=all bash -c "echo 4194304 >/proc/sys/net/core/rps_sock_flow_entries"

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>
Link: https://patch.msgid.link/20260302181432.1836150-5-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Documentation/networking/scaling.rst
include/net/hotdata.h
include/net/rps.h
net/core/dev.c
net/core/sysctl_net_core.c