Home
last modified time | relevance | path

Searched hist:"4 ffdd22e49f47db543906d75453a0048a53071ab" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/drivers/net/
H A Dtun.cdiff 4ffdd22e49f47db543906d75453a0048a53071ab Wed Oct 09 11:20:02 CDT 2019 Eric Dumazet <edumazet@google.com> tun: remove possible false sharing in tun_flow_update()

As mentioned in https://github.com/google/ktsan/wiki/READ_ONCE-and-WRITE_ONCE#it-may-improve-performance
a C compiler can legally transform

if (e->queue_index != queue_index)
e->queue_index = queue_index;

to :

e->queue_index = queue_index;

Note that the code using jiffies has no issue, since jiffies
has volatile attribute.

if (e->updated != jiffies)
e->updated = jiffies;

Fixes: 83b1bc122cab ("tun: align write-heavy flow entry members to a cache line")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Zhang Yu <zhangyu31@baidu.com>
Cc: Wang Li <wangli39@baidu.com>
Cc: Li RongQing <lirongqing@baidu.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>