summaryrefslogtreecommitdiffstats
path: root/net/bridge/br_input.c
diff options
context:
space:
mode:
authorNikolay Aleksandrov2017-02-04 18:05:09 +0100
committerDavid S. Miller2017-02-07 04:53:13 +0100
commit83a718d6294964fd1b227fa5f1ad001bc1fe7656 (patch)
tree9582a827ce818aba63b5bb5f0f7a3d1e9f992cf9 /net/bridge/br_input.c
parentbridge: move write-heavy fdb members in their own cache line (diff)
downloadkernel-qcow2-linux-83a718d6294964fd1b227fa5f1ad001bc1fe7656.tar.gz
kernel-qcow2-linux-83a718d6294964fd1b227fa5f1ad001bc1fe7656.tar.xz
kernel-qcow2-linux-83a718d6294964fd1b227fa5f1ad001bc1fe7656.zip
bridge: fdb: write to used and updated at most once per jiffy
Writing once per jiffy is enough to limit the bridge's false sharing. After this change the bridge doesn't show up in the local load HitM stats. Suggested-by: David S. Miller <davem@davemloft.net> Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge/br_input.c')
-rw-r--r--net/bridge/br_input.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/bridge/br_input.c b/net/bridge/br_input.c
index fba38d8a1a08..220943f920d2 100644
--- a/net/bridge/br_input.c
+++ b/net/bridge/br_input.c
@@ -198,7 +198,8 @@ int br_handle_frame_finish(struct net *net, struct sock *sk, struct sk_buff *skb
if (dst->is_local)
return br_pass_frame_up(skb);
- dst->used = jiffies;
+ if (jiffies != dst->used)
+ dst->used = jiffies;
br_forward(dst->dst, skb, local_rcv, false);
} else {
if (!mcast_hit)