Commit ec793e7b authored by Eric Dumazet's avatar Eric Dumazet Committed by Zheng Zengkai
Browse files

net: snmp: inline snmp_get_cpu_field()

mainline inclusion
from mainline-v5.16-rc4
commit 59f09ae8
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I4Z2Z9
Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=59f09ae8fac4a990070fc6bdc889d0e0118664ea



-------------------------------

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: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarCao Wangbao <caowangbao@huawei.com>
Reviewed-by: default avatarWu Changye <wuchangye@huawei.com>
Reviewed-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent ea5dbd25
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment