diff options
author | 2017-01-09 16:04:14 +0100 | |
---|---|---|
committer | 2017-01-09 15:49:12 -0500 | |
commit | 7ba91ecb16824f74ba4fcbc4e88cd4d24a839b25 (patch) | |
tree | 23bd866126b5115cf4a14541f7700117a38efc29 /tools/perf/scripts/python/call-graph-from-postgresql.py | |
parent | net: reduce cycles spend on ICMP replies that gets rate limited (diff) | |
download | linux-dev-7ba91ecb16824f74ba4fcbc4e88cd4d24a839b25.tar.xz linux-dev-7ba91ecb16824f74ba4fcbc4e88cd4d24a839b25.zip |
net: for rate-limited ICMP replies save one atomic operation
It is possible to avoid the atomic operation in icmp{v6,}_xmit_lock,
by checking the sysctl_icmp_msgs_per_sec ratelimit before these calls,
as pointed out by Eric Dumazet, but the BH disabled state must be correct.
The icmp_global_allow() call states it must be called with BH
disabled. This protection was given by the calls icmp_xmit_lock and
icmpv6_xmit_lock. Thus, split out local_bh_disable/enable from these
functions and maintain it explicitly at callers.
Suggested-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/perf/scripts/python/call-graph-from-postgresql.py')
0 files changed, 0 insertions, 0 deletions