Re: [PATCH v2] pci/switchtec: Don't use completion's wait queue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/2/2017 9:07 AM, Sebastian Andrzej Siewior wrote:
Why so? There is no way the compiler could have cached the value
somehow.

Well, I think it would be sufficient to notice that the code you were replacing used a READ_ONCE and you're putting it into a function that's a bit more complicated. But I'd suggest you read [1] which essentially says that all shared variables should be accessed with such a macro even if only to document that it's a part of a thread synchronization protocol.

Logan


[1] https://github.com/google/ktsan/wiki/READ_ONCE-and-WRITE_ONCE




[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux