mbox series

[0/3] Performance optimizations for PPC64

Message ID 20221021170112.151393-1-leandro.lupori@eldorado.org.br
Headers show
Series Performance optimizations for PPC64 | expand

Message

Leandro Lupori Oct. 21, 2022, 5:01 p.m. UTC
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(-)