Re: [PATCH v2 1/9] KVM: add kvm_request_pending

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

 



On Thu, Apr 06, 2017 at 04:37:51PM +0200, Christoffer Dall wrote:
> > FWIW, I first suggested using READ_ONCE() for the freshness argument,
> 
> What is the 'freshness argument' ?

My own made-up lingo to state that each time the variable is accessed it
must be loaded anew, taken care of by the volatile use in READ_ONCE.  As
vcpu->requests can be written by other threads, then I prefer READ_ONCE
being used to read it, as it allows me to avoid spending energy convincing
myself that the compiler would have emitted a load at that point anyway.

The writes to vcpu->requests always go through bitops, so they're already
also emitting fresh loads before doing their stores.

Thanks,
drew



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux