[PATCH 0/3] Performance optimizations for PPC64

Leandro Lupori posted 3 patches 1 year, 6 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20221021170112.151393-1-leandro.lupori@eldorado.org.br
Maintainers: Richard Henderson <richard.henderson@linaro.org>, Paolo Bonzini <pbonzini@redhat.com>, Daniel Henrique Barboza <danielhb413@gmail.com>, "Cédric Le Goater" <clg@kaod.org>, David Gibson <david@gibson.dropbear.id.au>, Greg Kurz <groug@kaod.org>
There is a newer version of this series
accel/tcg/cpu-exec.c     | 13 +++----
target/ppc/cpu.h         |  4 ++-
target/ppc/helper.h      |  1 +
target/ppc/helper_regs.c |  6 ++++
target/ppc/power8-pmu.c  | 74 +++++++++++++++++++++-------------------
target/ppc/power8-pmu.h  |  3 ++
target/ppc/translate.c   | 32 +++++++++++++++--
7 files changed, 87 insertions(+), 46 deletions(-)
[PATCH 0/3] Performance optimizations for PPC64
Posted by Leandro Lupori 1 year, 6 months ago
This patch series contains 2 performance optimizations that
target PPC64, although the first one also benefits other archs.

In the first optimization, the check for empty breakpoints' queue
is moved out of check_for_breakpoints(), into a macro, to avoid
the call overhead.

In the second optimization, the most frequently executed part of
the code that updates the PMCs is translated to inline TCG ops.
Also, new HFLAGS are introduced, to keep the inline code small and fast.

With both optimizations, a reduction of about 15% in Fedora's boot time
was measured on a POWER9 machine.

The PMU tests from kernel selftests were run and all tests that pass on
master still pass with these changes.

Leandro Lupori (3):
  accel/tcg: Add a quicker check for breakpoints
  target/ppc: Add new PMC HFLAGS
  target/ppc: Increment PMC5 with inline insns

 accel/tcg/cpu-exec.c     | 13 +++----
 target/ppc/cpu.h         |  4 ++-
 target/ppc/helper.h      |  1 +
 target/ppc/helper_regs.c |  6 ++++
 target/ppc/power8-pmu.c  | 74 +++++++++++++++++++++-------------------
 target/ppc/power8-pmu.h  |  3 ++
 target/ppc/translate.c   | 32 +++++++++++++++--
 7 files changed, 87 insertions(+), 46 deletions(-)

-- 
2.25.1