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>
This commit is contained in:
Nikolay Aleksandrov
2017-02-04 18:05:09 +01:00
committed by David S. Miller
parent 1214628cb1
commit 83a718d629
2 changed files with 4 additions and 2 deletions

View File

@@ -597,7 +597,8 @@ void br_fdb_update(struct net_bridge *br, struct net_bridge_port *source,
fdb->dst = source;
fdb_modified = true;
}
fdb->updated = jiffies;
if (jiffies != fdb->updated)
fdb->updated = jiffies;
if (unlikely(added_by_user))
fdb->added_by_user = 1;
if (unlikely(fdb_modified))