]> git.proxmox.com Git - mirror_qemu.git/commit
qsp: use atomic64 accessors
authorEmilio G. Cota <cota@braap.org>
Mon, 10 Sep 2018 23:27:44 +0000 (19:27 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 2 Oct 2018 16:47:55 +0000 (18:47 +0200)
commitac8c77486cbdd5d7be17c447ca64cbebd330f25a
tree4ee8837662cf3f04d1a09c0811619c0a90ba9ce6
parent82fdfcbe64ec09048d5f9b430b16231b9285d54b
qsp: use atomic64 accessors

With the seqlock, we either have to use atomics to remain
within defined behaviour (and note that 64-bit atomics aren't
always guaranteed to compile, irrespective of __nocheck), or
drop the atomics and be in undefined behaviour territory.

Fix it by dropping the seqlock and using atomic64 accessors.
This will limit scalability when !CONFIG_ATOMIC64, but those
machines (1) don't have many users and (2) are unlikely to
have many cores.

- With CONFIG_ATOMIC64:
$ tests/atomic_add-bench -n 1 -m -p
 Throughput:         13.00 Mops/s

- Forcing !CONFIG_ATOMIC64:
$ tests/atomic_add-bench -n 1 -m -p
 Throughput:         10.89 Mops/s

Signed-off-by: Emilio G. Cota <cota@braap.org>
Message-Id: <20180910232752.31565-5-cota@braap.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
util/qsp.c