Re: [Qemu-devel] [RFC 07/38] seqlock: read sequence number atomically

2015-09-07 Thread Paolo Bonzini
On 07/09/2015 17:53, Alex Bennée wrote: >> > With this change we make sure that the compiler will not >> > optimise the read of the sequence number in any way. > What was it doing? Using atomic_read to work around a compiler bug seems > a bit heavy handed if true atomicity isn't needed. This is

Re: [Qemu-devel] [RFC 07/38] seqlock: read sequence number atomically

2015-09-07 Thread Alex Bennée
Emilio G. Cota writes: > With this change we make sure that the compiler will not > optimise the read of the sequence number in any way. What was it doing? Using atomic_read to work around a compiler bug seems a bit heavy handed if true atomicity isn't needed. > > Signed-off-by: Emilio G. Cota

[Qemu-devel] [RFC 07/38] seqlock: read sequence number atomically

2015-08-23 Thread Emilio G. Cota
With this change we make sure that the compiler will not optimise the read of the sequence number in any way. Signed-off-by: Emilio G. Cota --- include/qemu/seqlock.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/qemu/seqlock.h b/include/qemu/seqlock.h index f