diff options
| author | Emilio G. Cota | 2018-09-11 01:27:44 +0200 |
|---|---|---|
| committer | Paolo Bonzini | 2018-10-02 18:47:55 +0200 |
| commit | ac8c77486cbdd5d7be17c447ca64cbebd330f25a (patch) | |
| tree | 4ee8837662cf3f04d1a09c0811619c0a90ba9ce6 /tests | |
| parent | tests: add atomic64-bench (diff) | |
| download | qemu-ac8c77486cbdd5d7be17c447ca64cbebd330f25a.tar.gz qemu-ac8c77486cbdd5d7be17c447ca64cbebd330f25a.tar.xz qemu-ac8c77486cbdd5d7be17c447ca64cbebd330f25a.zip | |
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>
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions
