All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 00/21] accel/tcg: remove implied BQL from cpu_handle_interrupt/exception path
@ 2020-08-05 18:12 Robert Foley
  2020-08-05 18:12 ` [PATCH v1 01/21] accel/tcg: Change interrupt/exception handling to remove implied BQL Robert Foley
                   ` (20 more replies)
  0 siblings, 21 replies; 38+ messages in thread
From: Robert Foley @ 2020-08-05 18:12 UTC (permalink / raw)
  To: qemu-devel; +Cc: pbonzini, cota, alex.bennee, robert.foley, peter.puhov

The purpose of this change is to set the groundwork
so that an arch could move towards removing
the BQL from the cpu_handle_interrupt/exception paths.

The BQL is a bottleneck in scaling to more cores.
And this cpu_handle_interrupt/exception path is one of
the key BQL users as measured by the QEMU sync profiling (qsp).

We have chosen to break up the process of removing
BQL from this path into two pieces:

1) Changes to the core/common functions of cpu_handle_interrupt/exception
   to drop the holding of the BQL. The holding of the BQL is pushed down
   to the per-arch implementation code.
   This set of changes is handled in this patch.

   This approach of pushing the BQL down to the per arch functions was
   suggested by Paolo Bonzini.
   For reference, here are two key posts in the discussion, explaining
   the reasoning/benefits of this approach.
   https://lists.gnu.org/archive/html/qemu-devel/2020-07/msg08731.html
   https://lists.gnu.org/archive/html/qemu-devel/2020-08/msg00044.html

2) Removing the BQL from the per-arch functions.
   Since the arch now has the code that grabs the BQL, each arch can
   change its use of the BQL for interrupts independently.
   We leave it up to the arch to make the change at the time that makes sense.

It is worth mentioning that we are working on per-arch changes
in line with 2), and plan to submit these.
In other words, we plan to set the groundwork with this
patch series and then will take advantage of it in later series.

This patch series is based on the per-CPU locks patch:
https://lists.gnu.org/archive/html/qemu-devel/2020-06/msg05314.html

Robert Foley (21):
  accel/tcg:  Change interrupt/exception handling to remove implied BQL
  target/alpha: add BQL to do_interrupt and cpu_exec_interrupt
  target/arm: add BQL to do_interrupt and cpu_exec_interrupt
  target/avr: add BQL to do_interrupt and cpu_exec_interrupt
  target/cris: add BQL to do_interrupt and cpu_exec_interrupt
  target/hppa: add BQL to do_interrupt and cpu_exec_interrupt
  target/i386: add BQL to do_interrupt and cpu_exec_interrupt
  target/lm32: add BQL to do_interrupt and cpu_exec_interrupt
  target/m68k: add BQL to do_interrupt and cpu_exec_interrupt
  target/microblaze: add BQL to do_interrupt and cpu_exec_interrupt
  target/mips: add BQL to do_interrupt and cpu_exec_interrupt
  target/nios2: add BQL to do_interrupt and cpu_exec_interrupt
  target/openrisc: add BQL to do_interrupt and cpu_exec_interrupt
  target/ppc: add BQL to do_interrupt and cpu_exec_interrupt
  target/riscv: add BQL to do_interrupt and cpu_exec_interrupt
  target/rx: add BQL to do_interrupt and cpu_exec_interrupt
  target/s390x: add BQL to do_interrupt and cpu_exec_interrupt
  target/sh4: add BQL to do_interrupt and cpu_exec_interrupt
  target/sparc: add BQL to do_interrupt and cpu_exec_interrupt
  target/unicore32: add BQL to do_interrupt and cpu_exec_interrupt
  target/xtensa: add BQL to do_interrupt and cpu_exec_interrupt

 accel/tcg/cpu-exec.c        | 19 +++++++++++--------
 target/alpha/helper.c       | 15 +++++++++++++--
 target/arm/cpu.c            | 13 ++++++++++---
 target/arm/helper.c         | 17 ++++++++++++++++-
 target/avr/helper.c         | 12 +++++++++++-
 target/cris/helper.c        | 18 ++++++++++++++++++
 target/hppa/int_helper.c    | 25 +++++++++++++++++++------
 target/i386/seg_helper.c    |  7 +++++--
 target/lm32/helper.c        | 10 ++++++++++
 target/m68k/op_helper.c     |  5 +++++
 target/microblaze/helper.c  | 20 ++++++++++++++++++++
 target/mips/helper.c        | 10 ++++++++++
 target/nios2/cpu.c          |  3 +++
 target/nios2/helper.c       |  8 +++++++-
 target/openrisc/interrupt.c | 10 ++++++++++
 target/ppc/excp_helper.c    |  5 +++++
 target/riscv/cpu_helper.c   | 10 ++++++++++
 target/rx/helper.c          | 10 ++++++++++
 target/s390x/excp_helper.c  | 12 +++++++++++-
 target/sh4/helper.c         | 13 +++++++++++--
 target/sparc/cpu.c          |  3 +++
 target/sparc/int32_helper.c | 13 ++++++++++++-
 target/unicore32/helper.c   |  3 +++
 target/unicore32/softmmu.c  |  7 +++++++
 target/xtensa/exc_helper.c  |  2 ++
 25 files changed, 242 insertions(+), 28 deletions(-)

-- 
2.17.1



^ permalink raw reply	[flat|nested] 38+ messages in thread

end of thread, other threads:[~2020-08-10 12:55 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-05 18:12 [PATCH v1 00/21] accel/tcg: remove implied BQL from cpu_handle_interrupt/exception path Robert Foley
2020-08-05 18:12 ` [PATCH v1 01/21] accel/tcg: Change interrupt/exception handling to remove implied BQL Robert Foley
2020-08-05 19:18   ` Richard Henderson
2020-08-06  9:22     ` Paolo Bonzini
2020-08-06 16:11       ` Robert Foley
2020-08-06 18:45         ` Paolo Bonzini
2020-08-06 20:04         ` Robert Foley
2020-08-07 22:18           ` Robert Foley
2020-08-08 12:00             ` Paolo Bonzini
2020-08-10 12:54               ` Robert Foley
2020-08-05 18:12 ` [PATCH v1 02/21] target/alpha: add BQL to do_interrupt and cpu_exec_interrupt Robert Foley
2020-08-05 19:18   ` Richard Henderson
2020-08-05 19:57     ` Robert Foley
2020-08-05 18:12 ` [PATCH v1 03/21] target/arm: " Robert Foley
2020-08-05 18:12 ` [PATCH v1 04/21] target/avr: " Robert Foley
2020-08-06 18:36   ` Michael Rolnik
2020-08-06 19:36     ` Robert Foley
2020-08-05 18:12 ` [PATCH v1 05/21] target/cris: " Robert Foley
2020-08-05 18:12 ` [PATCH v1 06/21] target/hppa: " Robert Foley
2020-08-05 18:12 ` [PATCH v1 07/21] target/i386: " Robert Foley
2020-08-05 18:12 ` [PATCH v1 08/21] target/lm32: " Robert Foley
2020-08-05 18:12 ` [PATCH v1 09/21] target/m68k: " Robert Foley
2020-08-05 18:12 ` [PATCH v1 10/21] target/microblaze: " Robert Foley
2020-08-05 18:12 ` [PATCH v1 11/21] target/mips: " Robert Foley
2020-08-05 18:12 ` [PATCH v1 12/21] target/nios2: " Robert Foley
2020-08-05 18:12 ` [PATCH v1 13/21] target/openrisc: " Robert Foley
2020-08-05 18:12 ` [PATCH v1 14/21] target/ppc: " Robert Foley
2020-08-05 18:12 ` [PATCH v1 15/21] target/riscv: " Robert Foley
2020-08-05 18:12   ` Robert Foley
2020-08-05 18:12 ` [PATCH v1 16/21] target/rx: " Robert Foley
2020-08-05 18:12 ` [PATCH v1 17/21] target/s390x: " Robert Foley
2020-08-06  8:59   ` Cornelia Huck
2020-08-06  9:12     ` Paolo Bonzini
2020-08-06 10:03       ` Alex Bennée
2020-08-05 18:13 ` [PATCH v1 18/21] target/sh4: " Robert Foley
2020-08-05 18:13 ` [PATCH v1 19/21] target/sparc: " Robert Foley
2020-08-05 18:13 ` [PATCH v1 20/21] target/unicore32: " Robert Foley
2020-08-05 18:13 ` [PATCH v1 21/21] target/xtensa: " Robert Foley

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.