aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorJesper Dangaard Brouer <brouer@redhat.com>2017-01-09 16:04:09 +0100
committerDavid S. Miller <davem@davemloft.net>2017-01-09 15:49:12 -0500
commitc0303efeab7391ec51c337e0ac5740860ad01fe7 (patch)
tree0f2653a5fe55f21588ada02923b2e68edec5c7a7 /net/mac80211
parentRevert "icmp: avoid allocating large struct on stack" (diff)
downloadlinux-dev-c0303efeab7391ec51c337e0ac5740860ad01fe7.tar.xz
linux-dev-c0303efeab7391ec51c337e0ac5740860ad01fe7.zip
net: reduce cycles spend on ICMP replies that gets rate limited
This patch split the global and per (inet)peer ICMP-reply limiter code, and moves the global limit check to earlier in the packet processing path. Thus, avoid spending cycles on ICMP replies that gets limited/suppressed anyhow. The global ICMP rate limiter icmp_global_allow() is a good solution, it just happens too late in the process. The kernel goes through the full route lookup (return path) for the ICMP message, before taking the rate limit decision of not sending the ICMP reply. Details: The kernels global rate limiter for ICMP messages got added in commit 4cdf507d5452 ("icmp: add a global rate limitation"). It is a token bucket limiter with a global lock. It brilliantly avoids locking congestion by only updating when 20ms (HZ/50) were elapsed. It can then avoids taking lock when credit is exhausted (when under pressure) and time constraint for refill is not yet meet. 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 'net/mac80211')
0 files changed, 0 insertions, 0 deletions