[Top][All Lists]

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

Re: [Qemu-devel] [PATCH v5 23/45] migrate_start_postcopy: Command to tri

From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH v5 23/45] migrate_start_postcopy: Command to trigger transition to postcopy
Date: Mon, 30 Mar 2015 21:22:58 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0

On 30/03/2015 19:04, Dr. David Alan Gilbert wrote:
>>> > > That one's a trickier question.  Compilers are absolutely capable
>>> > > of optimizing that far, *but* the C rules about when it's allowed
>>> > > to assume in-memory values remain unchanged are pretty
>>> > > conservative.  I think any function call in the loop will require
>>> > > it to reload the value, for example.  That said, a (compiler only)
>>> > > memory barrier might be appropriate to ensure that reload.
>> > 
>> > That's exactly what atomic_read provides.
> So does that say I need the atomic_read but not the atomic_write -
> which seems a bit weird, but I think only due to the naming.

No, you need both even though it's even more far-fetched that the
compiler will do something bad with the set.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]