]> git.baikalelectronics.ru Git - kernel.git/commit
net: snmp: inline snmp_get_cpu_field()
authorEric Dumazet <edumazet@google.com>
Thu, 30 Sep 2021 01:03:32 +0000 (18:03 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 30 Sep 2021 13:17:10 +0000 (14:17 +0100)
commit25bfe3606b0b7a7e39a6f122c47ef65214b0519d
treeb2a2ae1c36876b2ef1aea66848d36b9b51cc41f2
parent046db97759566c3c219820fccf9faf6fb2e9abac
net: snmp: inline snmp_get_cpu_field()

This trivial function is called ~90,000 times on 256 cpus hosts,
when reading /proc/net/netstat. And this number keeps inflating.

Inlining it saves many cycles.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/ip.h
net/ipv4/af_inet.c