From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48534) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bO7OC-0002TE-Lt for qemu-devel@nongnu.org; Fri, 15 Jul 2016 13:59:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bO7O8-0006wb-In for qemu-devel@nongnu.org; Fri, 15 Jul 2016 13:59:03 -0400 Received: from mail-lf0-x22a.google.com ([2a00:1450:4010:c07::22a]:36040) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bO7O7-0006wH-Uq for qemu-devel@nongnu.org; Fri, 15 Jul 2016 13:59:00 -0400 Received: by mail-lf0-x22a.google.com with SMTP id y184so4006674lfd.3 for ; Fri, 15 Jul 2016 10:58:59 -0700 (PDT) From: Sergey Fedorov Date: Fri, 15 Jul 2016 20:58:40 +0300 Message-Id: <20160715175852.30749-1-sergey.fedorov@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [PATCH v4 00/12] Reduce lock contention on TCG hot-path List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: patches@linaro.org, Sergey Fedorov , mttcg@listserver.greensocs.com, fred.konrad@greensocs.com, a.rigo@virtualopensystems.com, cota@braap.org, bobby.prani@gmail.com, rth@twiddle.net, mark.burton@greensocs.com, pbonzini@redhat.com, jan.kiszka@siemens.com, peter.maydell@linaro.org, claudio.fontana@huawei.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= From: Sergey Fedorov Hi, This is a respin of this series [1]. Here I used a modified version of Paolo's patch to docuement memory ordering assumptions for certain QHT operations. The last patch is a suggestion for renaming tb_find_physicall(). This series can be fetch from the public git repository: https://github.com/sergefdrv/qemu.git lockless-tb-lookup-v4 [1] http://thread.gmane.org/gmane.comp.emulators.qemu/426341 Kind regards, Sergey Summary of changes in v4: - Modified version of Paolo's patch is used to document memory ordering assumptions for certain QHT operations - Intermediate compilation errors fixed - Atomic access to TB CPU state - tb_find_physical() renamed Summary of changes in v3: - QHT memory ordering assumptions documented - 'tb_jmp_cache' reset in tb_flush() made atomic - explicit memory barriers removed around 'tb_jmp_cache' access - safe access to 'tb_flushed' out of 'tb_lock' prepared - TBs marked with invalid CPU state early on invalidation - Alex's tb_find_{fast,slow}() roll-up related patches dropped - bouncing of tb_lock between tb_gen_code() and tb_add_jump() avoided with local variable 'have_tb_lock' - tb_find_{fast,slow}() merged Alex Bennée (2): tcg: set up tb->page_addr before insertion tcg: cpu-exec: remove tb_lock from the hot-path Paolo Bonzini (1): util/qht: Document memory ordering assumptions Sergey Fedorov (9): tcg: Pass last_tb by value to tb_find_fast() tcg: Prepare safe tb_jmp_cache lookup out of tb_lock tcg: Prepare safe access to tb_flushed out of tb_lock target-i386: Remove redundant HF_SOFTMMU_MASK tcg: Introduce tb_mark_invalid() and tb_is_invalid() tcg: Prepare TB invalidation for lockless TB lookup tcg: Avoid bouncing tb_lock between tb_gen_code() and tb_add_jump() tcg: Merge tb_find_slow() and tb_find_fast() tcg: rename tb_find_physical() cpu-exec.c | 117 +++++++++++++++++++++-------------------------- include/exec/exec-all.h | 16 +++++++ include/qemu/qht.h | 5 ++ target-alpha/cpu.h | 14 ++++++ target-arm/cpu.h | 14 ++++++ target-cris/cpu.h | 14 ++++++ target-i386/cpu.c | 3 -- target-i386/cpu.h | 20 ++++++-- target-i386/translate.c | 12 ++--- target-lm32/cpu.h | 14 ++++++ target-m68k/cpu.h | 14 ++++++ target-microblaze/cpu.h | 14 ++++++ target-mips/cpu.h | 14 ++++++ target-moxie/cpu.h | 14 ++++++ target-openrisc/cpu.h | 14 ++++++ target-ppc/cpu.h | 14 ++++++ target-s390x/cpu.h | 14 ++++++ target-sh4/cpu.h | 14 ++++++ target-sparc/cpu.h | 14 ++++++ target-sparc/translate.c | 1 + target-tilegx/cpu.h | 14 ++++++ target-tricore/cpu.h | 14 ++++++ target-unicore32/cpu.h | 14 ++++++ target-xtensa/cpu.h | 14 ++++++ translate-all.c | 29 ++++++------ util/qht.c | 7 ++- 26 files changed, 352 insertions(+), 96 deletions(-) -- 2.9.1