Re: [PATCH net] tun: remove possible false sharing in tun_flow_update()

2019-10-09 Thread Jakub Kicinski
On Wed, 9 Oct 2019 09:20:02 -0700, Eric Dumazet wrote: > 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 : > >

Re: [PATCH net] tun: remove possible false sharing in tun_flow_update()

2019-10-09 Thread Jason Wang
On 2019/10/10 上午12:20, Eric Dumazet wrote: 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

[PATCH net] tun: remove possible false sharing in tun_flow_update()

2019-10-09 Thread Eric Dumazet
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 n