]> Git Repo - qemu.git/commit - accel/tcg/cpu-exec.c
tcg: cpu-exec: remove tb_lock from the hot-path
authorAlex Bennée <[email protected]>
Fri, 15 Jul 2016 17:58:49 +0000 (20:58 +0300)
committerPaolo Bonzini <[email protected]>
Tue, 13 Sep 2016 17:08:43 +0000 (19:08 +0200)
commit518615c6503ad78d3bb67ddf1cd848c4a41de02e
tree04a4b5226ae02df33058e6c8012be8949ef11b42
parent2e1ae44a4f4a6149fbb9dc812243522f07284700
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 <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
Reviewed-by: Sergey Fedorov <[email protected]>
Signed-off-by: Sergey Fedorov <[email protected]>
Message-Id: <20160715175852[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
cpu-exec.c
This page took 0.025454 seconds and 4 git commands to generate.