]> git.baikalelectronics.ru Git - kernel.git/commit
vxlan: reduce dirty cache line in vxlan_find_mac
authorLi RongQing <lirongqing@baidu.com>
Wed, 29 Aug 2018 03:52:10 +0000 (11:52 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 30 Aug 2018 05:07:53 +0000 (22:07 -0700)
commitb3b0dec2c61f0e4ad9ce5d54a6904eab7da592e2
tree3880ec429ca568b6622b849dbf09822ee367ea6b
parentaa5d32c37b4a846617e1e91f6671162fa298e864
vxlan: reduce dirty cache line in vxlan_find_mac

vxlan_find_mac() unconditionally set f->used for every packet,
this causes a cache miss for every packet, since remote, hlist
and used of vxlan_fdb share the same cache line, which are
accessed when send every packets.

so f->used is set only if not equal to jiffies, to reduce dirty
cache line times, this gives 3% speed-up with small packets.

Signed-off-by: Zhang Yu <zhangyu31@baidu.com>
Signed-off-by: Li RongQing <lirongqing@baidu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/vxlan.c