unicorn/qemu/include/qemu
Emilio G. Cota ab569f5cde
atomics: do not emit consume barrier for atomic_rcu_read
Currently we emit a consume-load in atomic_rcu_read. Because of
limitations in current compilers, this is overkill for non-Alpha hosts
and it is only useful to make Thread Sanitizer work.

This patch leaves the consume-load in atomic_rcu_read when
compiling with Thread Sanitizer enabled, and resorts to a
relaxed load + smp_read_barrier_depends otherwise.

On an RMO host architecture, such as aarch64, the performance
improvement of this change is easily measurable. For instance,
qht-bench performs an atomic_rcu_read on every lookup. Performance
before and after applying this patch:

$ tests/qht-bench -d 5 -n 1
Before: 9.78 MT/s
After: 10.96 MT/s

Backports commit 15487aa132109891482f79d78a30d6cfd465a391 from qemu
2018-02-24 03:28:11 -05:00
..
atomic.h atomics: do not emit consume barrier for atomic_rcu_read 2018-02-24 03:28:11 -05:00
bitmap.h memory: RCU ram_list.dirty_memory[] for safe RAM hotplug 2018-02-22 15:38:03 -05:00
bitops.h bitmap: add atomic set functions 2018-02-13 09:59:30 -05:00
bswap.h Move HOST_LONG_BITS from qemu-common.h to qemu/osdep.h 2018-02-21 23:10:43 -05:00
compiler.h compiler.h: Use glue() in QEMU_BUILD_BUG_ON define 2018-02-17 15:23:28 -05:00
crc32c.h import 2015-08-21 15:04:50 +08:00
cutils.h util: move declarations out of qemu-common.h 2018-02-22 09:25:48 -05:00
fprintf-fn.h Stop including qemu-common.h in memory.h 2018-02-17 15:23:16 -05:00
host-utils.h host-util: Add power calculation functions 2018-02-17 15:23:35 -05:00
int128.h Automated leading tab to spaces conversion. 2017-01-21 12:28:22 +11:00
log.h log: move qemu_log_close/qemu_log_flush from header to log.c 2018-02-22 11:13:17 -05:00
mmap-alloc.h exec: factor out duplicate mmap code 2018-02-17 15:24:03 -05:00
module.h cleanup qemu/include/qemu/module.h 2017-01-25 00:20:08 +08:00
osdep.h osdep: Move default qemu_hw_version() value to a macro 2018-02-24 03:16:34 -05:00
queue.h import 2015-08-21 15:04:50 +08:00
range.h platform.h move #3 2017-01-21 00:13:21 +11:00
thread-posix.h remove mutex code 2017-01-20 15:44:03 +08:00
thread-win32.h remove mutex code 2017-01-20 15:44:03 +08:00
thread.h platform.h move #3 2017-01-21 00:13:21 +11:00
timer.h include: move CPU-related definitions out of qemu-common.h 2018-02-24 00:33:49 -05:00
typedefs.h include/qemu/osdep.h: Don't include qapi/error.h 2018-02-21 23:08:18 -05:00