[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Wed, 9 Oct 2019 21:29:36 -0700
From: Jakub Kicinski <jakub.kicinski@...ronome.com>
To: Eric Dumazet <edumazet@...gle.com>
Cc: "David S . Miller" <davem@...emloft.net>,
netdev <netdev@...r.kernel.org>,
Eric Dumazet <eric.dumazet@...il.com>,
Zhang Yu <zhangyu31@...du.com>, Wang Li <wangli39@...du.com>,
Li RongQing <lirongqing@...du.com>,
Jason Wang <jasowang@...hat.com>
Subject: Re: [PATCH net] tun: remove possible false sharing in
tun_flow_update()
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 :
>
> 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@...gle.com>
> Cc: Zhang Yu <zhangyu31@...du.com>
> Cc: Wang Li <wangli39@...du.com>
> Cc: Li RongQing <lirongqing@...du.com>
> Cc: Jason Wang <jasowang@...hat.com>
Applied, same story with stable, thanks!
Powered by blists - more mailing lists