diff options
author | Eric Dumazet <[email protected]> | 2019-10-09 09:20:02 -0700 |
---|---|---|
committer | Jakub Kicinski <[email protected]> | 2019-10-09 21:29:33 -0700 |
commit | 4ffdd22e49f47db543906d75453a0048a53071ab (patch) | |
tree | 3fe252f49f9e7e4997a70c124594f6b459ee709b /tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py | |
parent | e37542ba111f3974dc622ae0a21c1787318de500 (diff) |
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 <[email protected]>
Cc: Zhang Yu <[email protected]>
Cc: Wang Li <[email protected]>
Cc: Li RongQing <[email protected]>
Acked-by: Jason Wang <[email protected]>
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py')
0 files changed, 0 insertions, 0 deletions