Re: [PATCH net] net: avoid possible false sharing in sk_leave_memory_pressure()

2019-10-09 Thread Jakub Kicinski
On Wed, 9 Oct 2019 12:55:53 -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 (memory_pressure && *memory_pressure) > *memory_pressure = 0; > > to : > > i

[PATCH net] net: avoid possible false sharing in sk_leave_memory_pressure()

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 (memory_pressure && *memory_pressure) *memory_pressure = 0; to : if (memory_pressure) *memory_pressure = 0; Fixes: 0604475119de ("tcp