qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] accel/tcg: remove implied BQL from cpu_handle_interrupt/exception path
@ 2020-07-31 12:51 Robert Foley
  2020-07-31 12:51 ` [PATCH 1/2] hw/core: Add bql_interrupt flag to CPUClass Robert Foley
  2020-07-31 12:51 ` [PATCH 2/2] accel/tcg: interrupt/exception handling uses bql_interrupt flag Robert Foley
  0 siblings, 2 replies; 13+ messages in thread
From: Robert Foley @ 2020-07-31 12:51 UTC (permalink / raw)
  To: qemu-devel; +Cc: robert.foley, cota, pbonzini, peter.puhov, alex.bennee, rth

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 bottlneck 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
   allowing a per-arch decision to hold BQL.
   The common case and the default is for the core code
   to hold the BQL (bql=true).
   This set of changes is handled in this patch.

2) Removing the BQL from the per-arch functions.
   1) makes it possible for an arch to set bql=false
   so that the common code does not hold the BQL
   across the cpu_handle_interrupt/exception call.
   This allows the arch to handle locking in this path
   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 (2):
  hw/core: Add bql_interrupt flag to CPUClass
  accel/tcg:  interrupt/exception handling uses bql_interrupt flag

 accel/tcg/cpu-exec.c  | 34 ++++++++++++++++++++++++++--------
 hw/core/cpu.c         |  1 +
 include/hw/core/cpu.h |  8 ++++++++
 3 files changed, 35 insertions(+), 8 deletions(-)

-- 
2.17.1



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

end of thread, other threads:[~2020-08-04 20:37 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-31 12:51 [PATCH 0/2] accel/tcg: remove implied BQL from cpu_handle_interrupt/exception path Robert Foley
2020-07-31 12:51 ` [PATCH 1/2] hw/core: Add bql_interrupt flag to CPUClass Robert Foley
2020-07-31 17:43   ` Eduardo Habkost
2020-07-31 19:14     ` Robert Foley
2020-07-31 19:24       ` Eduardo Habkost
2020-08-02 16:05         ` Alex Bennée
2020-08-04 20:36           ` Eduardo Habkost
2020-07-31 12:51 ` [PATCH 2/2] accel/tcg: interrupt/exception handling uses bql_interrupt flag Robert Foley
2020-07-31 18:02   ` Paolo Bonzini
2020-07-31 20:09     ` Robert Foley
2020-07-31 20:21       ` Paolo Bonzini
2020-08-02 16:09         ` Alex Bennée
2020-08-03  7:11           ` Paolo Bonzini

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).