summary refs log tree commit diff stats
path: root/include/qemu/timer.h
diff options
context:
space:
mode:
authorAlex Bennée <alex.bennee@linaro.org>2016-07-15 20:58:49 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2016-09-13 19:08:43 +0200
commit518615c6503ad78d3bb67ddf1cd848c4a41de02e (patch)
tree04a4b5226ae02df33058e6c8012be8949ef11b42 /include/qemu/timer.h
parent2e1ae44a4f4a6149fbb9dc812243522f07284700 (diff)
downloadfocaccia-qemu-518615c6503ad78d3bb67ddf1cd848c4a41de02e.tar.gz
focaccia-qemu-518615c6503ad78d3bb67ddf1cd848c4a41de02e.zip
tcg: cpu-exec: remove tb_lock from the hot-path
Lock contention in the hot path of moving between existing patched
TranslationBlocks is the main drag in multithreaded performance. This
patch pushes the tb_lock() usage down to the two places that really need
it:

  - code generation (tb_gen_code)
  - jump patching (tb_add_jump)

The rest of the code doesn't really need to hold a lock as it is either
using per-CPU structures, atomically updated or designed to be used in
concurrent read situations (qht_lookup).

To keep things simple I removed the #ifdef CONFIG_USER_ONLY stuff as the
locks become NOPs anyway until the MTTCG work is completed.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Reviewed-by: Sergey Fedorov <sergey.fedorov@linaro.org>
Signed-off-by: Sergey Fedorov <sergey.fedorov@linaro.org>

Message-Id: <20160715175852.30749-10-sergey.fedorov@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/qemu/timer.h')
0 files changed, 0 insertions, 0 deletions