From: Robert Foley <robert.foley@linaro.org>
To: qemu-devel@nongnu.org
Cc: richard.henderson@linaro.org, cota@braap.org,
alex.bennee@linaro.org, robert.foley@linaro.org,
peter.puhov@linaro.org
Subject: [PATCH v9 00/74] per-CPU locks
Date: Thu, 21 May 2020 12:38:57 -0400 [thread overview]
Message-ID: <20200521164011.638-1-robert.foley@linaro.org> (raw)
v8: https://lists.gnu.org/archive/html/qemu-devel/2020-03/msg08031.html
Quoting an earlier patch in the series:
"For context, the goal of this series is to substitute the BQL for the
per-CPU locks in many places, notably the execution loop in cpus.c.
This leads to better scalability for MTTCG, since CPUs don't have
to acquire a contended global lock (the BQL) every time they
stop executing code.
See the last commit for some performance numbers."
Listed below are the changes for this version of the patch,
aside from the merge related changes.
Changes for v9:
- Fixed merge issue in cpu_common_finalize().
- relocate CPU_LOCK_BITMAP_SIZE from cpus.c to hw/core/cpu.h.
assert on it in smp_parse() from hw/core/machine.c.
- Modified stubs/cpu-lock.c to have an empty implementation of
cpu_mutex_lock_impl/unlock_impl.
- Cleaned up many commits to remove CCs where the review or ack
was already added.
Emilio G. Cota (69):
cpu: convert queued work to a QSIMPLEQ
cpu: rename cpu->work_mutex to cpu->lock
cpu: introduce cpu_mutex_lock/unlock
cpu: make qemu_work_cond per-cpu
cpu: move run_on_cpu to cpus-common
cpu: introduce process_queued_cpu_work_locked
cpu: make per-CPU locks an alias of the BQL in TCG rr mode
tcg-runtime: define helper_cpu_halted_set
ppc: convert to helper_cpu_halted_set
cris: convert to helper_cpu_halted_set
hppa: convert to helper_cpu_halted_set
m68k: convert to helper_cpu_halted_set
alpha: convert to helper_cpu_halted_set
microblaze: convert to helper_cpu_halted_set
cpu: define cpu_halted helpers
tcg-runtime: convert to cpu_halted_set
arm: convert to cpu_halted
ppc: convert to cpu_halted
sh4: convert to cpu_halted
i386: convert to cpu_halted
lm32: convert to cpu_halted
m68k: convert to cpu_halted
mips: convert to cpu_halted
riscv: convert to cpu_halted
s390x: convert to cpu_halted
sparc: convert to cpu_halted
xtensa: convert to cpu_halted
gdbstub: convert to cpu_halted
openrisc: convert to cpu_halted
cpu-exec: convert to cpu_halted
cpu: convert to cpu_halted
cpu: define cpu_interrupt_request helpers
exec: use cpu_reset_interrupt
arm: convert to cpu_interrupt_request
i386: convert to cpu_interrupt_request
i386/kvm: convert to cpu_interrupt_request
i386/hax-all: convert to cpu_interrupt_request
i386/whpx-all: convert to cpu_interrupt_request
i386/hvf: convert to cpu_request_interrupt
ppc: convert to cpu_interrupt_request
sh4: convert to cpu_interrupt_request
cris: convert to cpu_interrupt_request
hppa: convert to cpu_interrupt_request
lm32: convert to cpu_interrupt_request
m68k: convert to cpu_interrupt_request
mips: convert to cpu_interrupt_request
nios: convert to cpu_interrupt_request
s390x: convert to cpu_interrupt_request
alpha: convert to cpu_interrupt_request
moxie: convert to cpu_interrupt_request
sparc: convert to cpu_interrupt_request
openrisc: convert to cpu_interrupt_request
unicore32: convert to cpu_interrupt_request
microblaze: convert to cpu_interrupt_request
accel/tcg: convert to cpu_interrupt_request
cpu: convert to interrupt_request
cpu: call .cpu_has_work with the CPU lock held
cpu: introduce cpu_has_work_with_iothread_lock
ppc: convert to cpu_has_work_with_iothread_lock
mips: convert to cpu_has_work_with_iothread_lock
s390x: convert to cpu_has_work_with_iothread_lock
riscv: convert to cpu_has_work_with_iothread_lock
sparc: convert to cpu_has_work_with_iothread_lock
xtensa: convert to cpu_has_work_with_iothread_lock
cpu: rename all_cpu_threads_idle to qemu_tcg_rr_all_cpu_threads_idle
cpu: protect CPU state with cpu->lock instead of the BQL
cpus-common: release BQL earlier in run_on_cpu
cpu: add async_run_on_cpu_no_bql
cputlb: queue async flush jobs without the BQL
Paolo Bonzini (4):
ppc: use cpu_reset_interrupt
i386: use cpu_reset_interrupt
s390x: use cpu_reset_interrupt
openrisc: use cpu_reset_interrupt
Robert Foley (1):
hw/semihosting: convert to cpu_halted_set
accel/tcg/cpu-exec.c | 40 ++-
accel/tcg/cputlb.c | 10 +-
accel/tcg/tcg-all.c | 12 +-
accel/tcg/tcg-runtime.c | 7 +
accel/tcg/tcg-runtime.h | 2 +
accel/tcg/translate-all.c | 2 +-
cpus-common.c | 129 +++++++---
cpus.c | 435 ++++++++++++++++++++++++++------
exec.c | 2 +-
gdbstub.c | 4 +-
hw/arm/omap1.c | 4 +-
hw/arm/pxa2xx_gpio.c | 2 +-
hw/arm/pxa2xx_pic.c | 2 +-
hw/core/cpu.c | 29 +--
hw/core/machine-qmp-cmds.c | 2 +-
hw/core/machine.c | 1 +
hw/intc/s390_flic.c | 4 +-
hw/mips/cps.c | 2 +-
hw/misc/mips_itu.c | 4 +-
hw/openrisc/cputimer.c | 2 +-
hw/ppc/e500.c | 4 +-
hw/ppc/ppc.c | 12 +-
hw/ppc/ppce500_spin.c | 6 +-
hw/ppc/spapr_cpu_core.c | 4 +-
hw/ppc/spapr_hcall.c | 14 +-
hw/ppc/spapr_rtas.c | 8 +-
hw/semihosting/console.c | 4 +-
hw/sparc/leon3.c | 2 +-
hw/sparc/sun4m.c | 8 +-
hw/sparc64/sparc64.c | 8 +-
include/hw/core/cpu.h | 200 +++++++++++++--
stubs/Makefile.objs | 1 +
stubs/cpu-lock.c | 27 ++
target/alpha/cpu.c | 8 +-
target/alpha/translate.c | 6 +-
target/arm/arm-powerctl.c | 6 +-
target/arm/cpu.c | 8 +-
target/arm/helper.c | 16 +-
target/arm/machine.c | 2 +-
target/arm/op_helper.c | 2 +-
target/cris/cpu.c | 2 +-
target/cris/helper.c | 4 +-
target/cris/translate.c | 5 +-
target/hppa/cpu.c | 2 +-
target/hppa/translate.c | 3 +-
target/i386/cpu.c | 4 +-
target/i386/cpu.h | 2 +-
target/i386/hax-all.c | 42 +--
target/i386/helper.c | 8 +-
target/i386/hvf/hvf.c | 12 +-
target/i386/hvf/x86hvf.c | 37 +--
target/i386/kvm.c | 82 +++---
target/i386/misc_helper.c | 2 +-
target/i386/seg_helper.c | 13 +-
target/i386/svm_helper.c | 6 +-
target/i386/whpx-all.c | 57 +++--
target/lm32/cpu.c | 2 +-
target/lm32/op_helper.c | 4 +-
target/m68k/cpu.c | 2 +-
target/m68k/op_helper.c | 2 +-
target/m68k/translate.c | 9 +-
target/microblaze/cpu.c | 2 +-
target/microblaze/translate.c | 4 +-
target/mips/cp0_helper.c | 6 +-
target/mips/cpu.c | 11 +-
target/mips/kvm.c | 4 +-
target/mips/op_helper.c | 2 +-
target/mips/translate.c | 4 +-
target/moxie/cpu.c | 2 +-
target/nios2/cpu.c | 2 +-
target/openrisc/cpu.c | 4 +-
target/openrisc/sys_helper.c | 4 +-
target/ppc/excp_helper.c | 6 +-
target/ppc/helper_regs.h | 2 +-
target/ppc/kvm.c | 6 +-
target/ppc/translate.c | 6 +-
target/ppc/translate_init.inc.c | 41 +--
target/riscv/cpu.c | 5 +-
target/riscv/op_helper.c | 2 +-
target/s390x/cpu.c | 28 +-
target/s390x/excp_helper.c | 4 +-
target/s390x/kvm.c | 2 +-
target/s390x/sigp.c | 8 +-
target/sh4/cpu.c | 2 +-
target/sh4/helper.c | 2 +-
target/sh4/op_helper.c | 2 +-
target/sparc/cpu.c | 6 +-
target/sparc/helper.c | 2 +-
target/unicore32/cpu.c | 2 +-
target/unicore32/softmmu.c | 2 +-
target/xtensa/cpu.c | 6 +-
target/xtensa/exc_helper.c | 2 +-
target/xtensa/helper.c | 2 +-
93 files changed, 1060 insertions(+), 464 deletions(-)
create mode 100644 stubs/cpu-lock.c
--
2.17.1
next reply other threads:[~2020-05-21 16:44 UTC|newest]
Thread overview: 79+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-21 16:38 Robert Foley [this message]
2020-05-21 16:38 ` [PATCH v9 01/74] cpu: convert queued work to a QSIMPLEQ Robert Foley
2020-05-21 16:38 ` [PATCH v9 02/74] cpu: rename cpu->work_mutex to cpu->lock Robert Foley
2020-05-21 16:39 ` [PATCH v9 03/74] cpu: introduce cpu_mutex_lock/unlock Robert Foley
2020-05-21 16:39 ` [PATCH v9 04/74] cpu: make qemu_work_cond per-cpu Robert Foley
2020-05-21 16:39 ` [PATCH v9 05/74] cpu: move run_on_cpu to cpus-common Robert Foley
2020-05-21 16:39 ` [PATCH v9 06/74] cpu: introduce process_queued_cpu_work_locked Robert Foley
2020-05-21 16:39 ` [PATCH v9 07/74] cpu: make per-CPU locks an alias of the BQL in TCG rr mode Robert Foley
2020-05-21 16:39 ` [PATCH v9 08/74] tcg-runtime: define helper_cpu_halted_set Robert Foley
2020-05-21 16:39 ` [PATCH v9 09/74] ppc: convert to helper_cpu_halted_set Robert Foley
2020-05-21 16:39 ` [PATCH v9 10/74] cris: " Robert Foley
2020-05-21 16:45 ` Edgar E. Iglesias
2020-05-21 16:39 ` [PATCH v9 11/74] hppa: " Robert Foley
2020-05-21 16:39 ` [PATCH v9 12/74] m68k: " Robert Foley
2020-05-21 16:39 ` [PATCH v9 13/74] alpha: " Robert Foley
2020-05-21 16:39 ` [PATCH v9 14/74] microblaze: " Robert Foley
2020-05-21 16:45 ` Edgar E. Iglesias
2020-05-21 16:39 ` [PATCH v9 15/74] cpu: define cpu_halted helpers Robert Foley
2020-05-21 16:39 ` [PATCH v9 16/74] tcg-runtime: convert to cpu_halted_set Robert Foley
2020-05-21 16:39 ` [PATCH v9 17/74] hw/semihosting: " Robert Foley
2020-05-21 16:39 ` [PATCH v9 18/74] arm: convert to cpu_halted Robert Foley
2020-05-21 16:39 ` [PATCH v9 19/74] ppc: " Robert Foley
2020-05-21 16:39 ` [PATCH v9 20/74] sh4: " Robert Foley
2020-05-21 16:39 ` [PATCH v9 21/74] i386: " Robert Foley
2020-05-21 16:39 ` [PATCH v9 22/74] lm32: " Robert Foley
2020-05-21 16:39 ` [PATCH v9 23/74] m68k: " Robert Foley
2020-05-21 16:39 ` [PATCH v9 24/74] mips: " Robert Foley
2020-05-21 16:39 ` [PATCH v9 25/74] riscv: " Robert Foley
2020-05-21 16:39 ` [PATCH v9 26/74] s390x: " Robert Foley
2020-05-21 16:39 ` [PATCH v9 27/74] sparc: " Robert Foley
2020-05-21 16:39 ` [PATCH v9 28/74] xtensa: " Robert Foley
2020-05-21 16:39 ` [PATCH v9 29/74] gdbstub: " Robert Foley
2020-05-21 16:39 ` [PATCH v9 30/74] openrisc: " Robert Foley
2020-05-21 16:39 ` [PATCH v9 31/74] cpu-exec: " Robert Foley
2020-05-21 16:39 ` [PATCH v9 32/74] cpu: " Robert Foley
2020-05-21 16:39 ` [PATCH v9 33/74] cpu: define cpu_interrupt_request helpers Robert Foley
2020-05-21 16:39 ` [PATCH v9 34/74] ppc: use cpu_reset_interrupt Robert Foley
2020-05-21 16:39 ` [PATCH v9 35/74] exec: " Robert Foley
2020-05-21 16:39 ` [PATCH v9 36/74] i386: " Robert Foley
2020-05-21 16:39 ` [PATCH v9 37/74] s390x: " Robert Foley
2020-05-21 16:39 ` [PATCH v9 38/74] openrisc: " Robert Foley
2020-05-21 16:39 ` [PATCH v9 39/74] arm: convert to cpu_interrupt_request Robert Foley
2020-05-21 16:39 ` [PATCH v9 40/74] i386: " Robert Foley
2020-05-21 16:39 ` [PATCH v9 41/74] i386/kvm: " Robert Foley
2020-05-21 16:39 ` [PATCH v9 42/74] i386/hax-all: " Robert Foley
2020-05-21 16:39 ` [PATCH v9 43/74] i386/whpx-all: " Robert Foley
2020-05-21 16:39 ` [PATCH v9 44/74] i386/hvf: convert to cpu_request_interrupt Robert Foley
2020-05-21 16:39 ` [PATCH v9 45/74] ppc: convert to cpu_interrupt_request Robert Foley
2020-05-21 16:39 ` [PATCH v9 46/74] sh4: " Robert Foley
2020-05-21 16:39 ` [PATCH v9 47/74] cris: " Robert Foley
2020-05-21 16:45 ` Edgar E. Iglesias
2020-05-21 16:39 ` [PATCH v9 48/74] hppa: " Robert Foley
2020-05-21 16:39 ` [PATCH v9 49/74] lm32: " Robert Foley
2020-05-21 16:39 ` [PATCH v9 50/74] m68k: " Robert Foley
2020-05-21 16:39 ` [PATCH v9 51/74] mips: " Robert Foley
2020-05-21 16:39 ` [PATCH v9 52/74] nios: " Robert Foley
2020-05-21 16:39 ` [PATCH v9 53/74] s390x: " Robert Foley
2020-05-21 16:39 ` [PATCH v9 54/74] alpha: " Robert Foley
2020-05-21 16:39 ` [PATCH v9 55/74] moxie: " Robert Foley
2020-05-21 16:39 ` [PATCH v9 56/74] sparc: " Robert Foley
2020-05-21 16:39 ` [PATCH v9 57/74] openrisc: " Robert Foley
2020-05-21 16:39 ` [PATCH v9 58/74] unicore32: " Robert Foley
2020-05-21 16:39 ` [PATCH v9 59/74] microblaze: " Robert Foley
2020-05-21 16:46 ` Edgar E. Iglesias
2020-05-21 16:39 ` [PATCH v9 60/74] accel/tcg: " Robert Foley
2020-05-21 16:39 ` [PATCH v9 61/74] cpu: convert to interrupt_request Robert Foley
2020-05-21 16:39 ` [PATCH v9 62/74] cpu: call .cpu_has_work with the CPU lock held Robert Foley
2020-05-21 16:40 ` [PATCH v9 63/74] cpu: introduce cpu_has_work_with_iothread_lock Robert Foley
2020-05-21 16:40 ` [PATCH v9 64/74] ppc: convert to cpu_has_work_with_iothread_lock Robert Foley
2020-05-21 16:40 ` [PATCH v9 65/74] mips: " Robert Foley
2020-05-21 16:40 ` [PATCH v9 66/74] s390x: " Robert Foley
2020-05-21 16:40 ` [PATCH v9 67/74] riscv: " Robert Foley
2020-05-21 16:40 ` [PATCH v9 68/74] sparc: " Robert Foley
2020-05-21 16:40 ` [PATCH v9 69/74] xtensa: " Robert Foley
2020-05-21 16:40 ` [PATCH v9 70/74] cpu: rename all_cpu_threads_idle to qemu_tcg_rr_all_cpu_threads_idle Robert Foley
2020-05-21 16:40 ` [PATCH v9 71/74] cpu: protect CPU state with cpu->lock instead of the BQL Robert Foley
2020-05-21 16:40 ` [PATCH v9 72/74] cpus-common: release BQL earlier in run_on_cpu Robert Foley
2020-05-21 16:40 ` [PATCH v9 73/74] cpu: add async_run_on_cpu_no_bql Robert Foley
2020-05-21 16:40 ` [PATCH v9 74/74] cputlb: queue async flush jobs without the BQL Robert Foley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200521164011.638-1-robert.foley@linaro.org \
--to=robert.foley@linaro.org \
--cc=alex.bennee@linaro.org \
--cc=cota@braap.org \
--cc=peter.puhov@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).