qemu-devel
[Top][All Lists]
Advanced

[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 10:17:06 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0


On 19/03/2015 10:33, Dr. David Alan Gilbert wrote:
>> > But still pointless.  Atomicity isn't magic pixie dust; it only makes
>> > sense if you're making atomic specific operations that need to be.
>> > Simple integer loads and stores are already atomic.  Unless at least
>> > some of the atomic operations are something more complex, there's
>> > really no point to atomically marked operations.
> OK, I'll kill it off.

No, don't.

And both of you, read docs/atomics.txt.

"atomic_read() and atomic_set() prevents the compiler from using
optimizations that might otherwise optimize accesses out of existence
on the one hand, or that might create unsolicited accesses on the other.
[...] it tells readers which variables are shared with
other threads, and which are local to the current thread or protected
by other, more mundane means."

atomic_read() and atomic_set() provide the same guarantees as
ACCESS_ONCE in the Linux kernel.

Paolo



reply via email to

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