[PATCH 0/6] aspeed: avocado test boosts

Cédric Le Goater posted 6 patches 5 days, 19 hours ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20220923084803.498337-1-clg@kaod.org
Maintainers: Richard Henderson <richard.henderson@linaro.org>, Paolo Bonzini <pbonzini@redhat.com>, Eduardo Habkost <eduardo@habkost.net>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, "Philippe Mathieu-Daudé" <f4bug@amsat.org>, Yanan Wang <wangyanan55@huawei.com>, "Cédric Le Goater" <clg@kaod.org>, Peter Maydell <peter.maydell@linaro.org>, Andrew Jeffery <andrew@aj.id.au>, Joel Stanley <joel@jms.id.au>, Alistair Francis <alistair@alistair23.me>, Cleber Rosa <crosa@redhat.com>, Wainer dos Santos Moschetta <wainersm@redhat.com>, Beraldo Leal <bleal@redhat.com>
include/hw/core/cpu.h           |  9 +++++++++
include/hw/ssi/aspeed_smc.h     |  2 ++
include/hw/ssi/ssi.h            |  3 +++
accel/tcg/cputlb.c              | 15 ++++++---------
cpu.c                           |  9 ++++-----
hw/core/cpu-sysemu.c            |  5 ++---
hw/ssi/aspeed_smc.c             |  9 ++++-----
hw/ssi/ssi.c                    | 18 ++++++++----------
tests/avocado/machine_aspeed.py | 16 ++++++++--------
9 files changed, 46 insertions(+), 40 deletions(-)
[PATCH 0/6] aspeed: avocado test boosts
Posted by Cédric Le Goater 5 days, 19 hours ago
Hello,

Alex's patchset [1] showed that by avoiding the class cast checkers in
hot code paths, performance is greatly improved. See results below.

This is a partial resend of [1] plus an extra caching a reference on
the AspeedSMC class, which adds an extra 10% boost.

Thanks ,

C.

[1] http://patchwork.ozlabs.org/project/qemu-devel/list/?series=313458


On a ThinkPad T480 i7-8650U, 

Before :

$ build/tests/venv/bin/avocado --show=app run build/tests/avocado/machine_aspeed.py
    ...
   (1/7) AST1030Machine.test_ast1030_zephyros: PASS (0.21 s)
   (2/7) AST2x00Machine.test_arm_ast2400_palmetto_openbmc_v2_9_0: PASS (23.51 s)
   (3/7) AST2x00Machine.test_arm_ast2500_romulus_openbmc_v2_9_0: PASS (39.59 s)
   (4/7) AST2x00Machine.test_arm_ast2500_evb_buildroot: PASS (23.74 s)
   (5/7) AST2x00Machine.test_arm_ast2600_evb_buildroot: PASS (34.44 s)
   (6/7) AST2x00MachineSDK.test_arm_ast2500_evb_sdk: PASS (91.13 s)
   (7/7) AST2x00MachineSDK.test_arm_ast2600_evb_sdk: PASS (112.27 s)
  RESULTS    : PASS 7 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
  JOB TIME   : 325.72 s

After :

  $ build/tests/venv/bin/avocado --show=app run build/tests/avocado/machine_aspeed.py
    ...
   (1/7) AST1030Machine.test_ast1030_zephyros: PASS (0.22 s)
   (2/7) AST2x00Machine.test_arm_ast2400_palmetto_openbmc_v2_9_0: PASS (12.44 s)
   (3/7) AST2x00Machine.test_arm_ast2500_romulus_openbmc_v2_9_0: PASS (13.98 s)
   (4/7) AST2x00Machine.test_arm_ast2500_evb_buildroot: PASS (11.74 s)
   (5/7) AST2x00Machine.test_arm_ast2600_evb_buildroot: PASS (15.90 s)
   (6/7) AST2x00MachineSDK.test_arm_ast2500_evb_sdk: PASS (66.75 s)
   (7/7) AST2x00MachineSDK.test_arm_ast2600_evb_sdk: PASS (82.34 s)
  RESULTS    : PASS 7 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
  JOB TIME   : 204.33 s
  
  


Alex Bennée (4):
  cpu: cache CPUClass in CPUState for hot code paths
  hw/core/cpu-sysemu: used cached class in cpu_asidx_from_attrs
  cputlb: used cached CPUClass in our hot-paths
  ssi: cache SSIPeripheralClass to avoid GET_CLASS()

Cédric Le Goater (2):
  tests/avocado/machine_aspeed.py: Fix typos on buildroot
  aspeed/smc: Cache AspeedSMCClass

 include/hw/core/cpu.h           |  9 +++++++++
 include/hw/ssi/aspeed_smc.h     |  2 ++
 include/hw/ssi/ssi.h            |  3 +++
 accel/tcg/cputlb.c              | 15 ++++++---------
 cpu.c                           |  9 ++++-----
 hw/core/cpu-sysemu.c            |  5 ++---
 hw/ssi/aspeed_smc.c             |  9 ++++-----
 hw/ssi/ssi.c                    | 18 ++++++++----------
 tests/avocado/machine_aspeed.py | 16 ++++++++--------
 9 files changed, 46 insertions(+), 40 deletions(-)

-- 
2.37.3