[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[PATCH 0/3] CI/test improvements in qemuxml2argvtest



Hi,

This started as a saga of figuring out why Libvirt was failing
to build in a Power 9 host after the switch to meson. Turns
out that one of the tests, qemuxml2argvtest, is taking almost
5 minutes to complete, and meson throws a timeout error. This
wasn't noticed before because the test actually completes
without errors.

Running 'perf' showed that 95% of the time spent in
qemuxml2argvtest in Power 9 were in virHostCPUGetMicrocodeVersion()
calls, which is not needed for PowerPC since 'microcode' is
x86 specific. This means that we're calling 'show_cpuinfo' from
the kernel, fetching dynamic data from all CPUs, and then
failing because there is no 'microcode' string. The Power 9
host I tested with has 128 CPUs, meaning that 'show_cpuinfo'
is not something to scoff at.

First patch is a trivial cleanup. Patch 02 is a runtime fix.
The cake is in patch 03. Patch 03 will improve CI on all
archs, including x86, which is nice.



Daniel Henrique Barboza (3):
  virhostcpu.c: modernize virHostCPUGetMicrocodeVersion()
  virhostcpu.c: skip non x86 hosts in virHostCPUGetMicrocodeVersion()
  domaincapsmoc.c: mock virHostCPUGetMicrocodeVersion()

 src/cpu/cpu_x86.c            |  2 +-
 src/qemu/qemu_capabilities.c |  4 ++--
 src/util/virhostcpu.c        | 13 +++++++------
 src/util/virhostcpu.h        |  3 ++-
 tests/domaincapsmock.c       |  6 ++++++
 5 files changed, 18 insertions(+), 10 deletions(-)

-- 
2.26.2


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]