> -----Original Message-----
> From: Greg KH [mailto:gre...@linuxfoundation.org]
> Sent: Thursday, March 31, 2016 5:01 PM
> To: KY Srinivasan <k...@microsoft.com>
> Cc: linux-kernel@vger.kernel.org; de...@linuxdriverproject.org;
> o...@aepfle.de; a...@canonical.com; vkuzn...@redhat.com;
> jasow...@redhat.com
> Subject: Re: [PATCH 2/7] Drivers: hv: vmbus: Use READ_ONCE() to read
> variables that are volatile
> 
> On Wed, Mar 23, 2016 at 05:53:52PM -0700, K. Y. Srinivasan wrote:
> > Use the READ_ONCE macro to access variabes that can change
> asynchronously.
> 
> Why?  What is this "fixing"?

This is to prevent the compiler optimizations and moving the code. This is the
recommended mechanism for reading volatile variables. 

Regards,

K. Y
> 
> thanks,
> 
> greg k-h

Reply via email to