[PATCHv3 0/6] Use query-cpus-fast instead of query-cpus

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

 



The QEMU monitor commmand query-cpus is deprecated starting
with QEMU 2.12.0 because it can adversely affect the performance of
a running virtual machine.

This series enables libvirt to use the new query-cpus-fast interface
if supported by the local QEMU instance and is required in order
to support QEMU once the interface has been removed.

query-cpus-fast doesn't return the halted state for a virtual CPU,
meaning that the vcpu.<n>.halted value won't be reported with
'virsh domstats' anymore. This is OK, as stats values are not
guaranteed to be reported under all circumstances and on all
architectures.

Upstream discussion consensus was that the halted state was
problematic anyway, as it had different semantics per architecture.
The only known exploitation happened for s390, for this architecture
the halted state will be computed based on an architecture-specific
cpu value returned in query-cpus-fast.

v2 -> v3:
=========
  Patch changes:
  1/6:
  - formatting changes as requested by John Ferlan
  - updated the qemucapabilitiestest XML files
  - dropped A/R-bys (due to change above)
  
  2/6:
  - fixed comment to also account for query-cpus-fast

  3/6:
  - updated json monitor tests to account for props returned by
    query-cpus and query-cpus-fast
  - updated json monitor tests to handle the halted property
    (moved here from patch 5)

  4/6:
  - removed stale text (about callbacks) from commit message 
  - simplified qemuMonitorJSONExtractCPUArchInfo call
  - enhanced sample JSON response in comment
  - fixed inter-function spacing

  5/6:
  - kept s390-specific tests and moved the rest to patch 3
  - reformatted the JSON responses (indented "props")
  - dropped R-b

v1 -> v2:
=========
  Patch changes:
  1/6:
  - add Acked-by: Peter Krempa  

  2/6:
  - evaluate capability outside of monitor code (changes signatures
    of qemuMonitorGetCPUInfo and qemuMonitorGetCpuHalted)
  - remove ternary expressions as requested by review
  - remove Reviewed-bys due to code changes

  3/6 
  - adapt test cases to changes above
  - remove Reviewed-bys due to code changes

  4/6
  - replace callbacks for architecture data extraction with direct
    function calls
  - remove Reviewed-bys due to code changes

Viktor Mihajlovski (6):
  qemu: add capability detection for query-cpus-fast
  qemu: use query-cpus-fast in JSON monitor
  tests: add qemumonitorjson tests for query-cpus-fast
  qemu: add architecture-specific CPU info handling
  tests: add testcase for s390 query-cpus-fast
  qemu: refresh vcpu halted state only via query-cpus-fast

 src/qemu/qemu_capabilities.c                       |   2 +
 src/qemu/qemu_capabilities.h                       |   1 +
 src/qemu/qemu_domain.c                             |  23 +++-
 src/qemu/qemu_monitor.c                            |  30 +++--
 src/qemu/qemu_monitor.h                            |   7 +-
 src/qemu/qemu_monitor_json.c                       | 133 +++++++++++++++++++--
 src/qemu/qemu_monitor_json.h                       |   3 +-
 tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml |   1 +
 tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml   |   1 +
 tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml   |   1 +
 tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml  |   1 +
 .../qemumonitorjson-cpuinfo-ppc64-hotplug-4.data   |   8 ++
 .../qemumonitorjson-cpuinfo-s390-fast-cpus.json    |  25 ++++
 .../qemumonitorjson-cpuinfo-s390-fast-hotplug.json |  21 ++++
 .../qemumonitorjson-cpuinfo-s390-fast.data         |  19 +++
 ...emumonitorjson-cpuinfo-x86-basic-pluggable.data |   5 +
 ...qemumonitorjson-cpuinfo-x86-full-fast-cpus.json | 126 +++++++++++++++++++
 ...umonitorjson-cpuinfo-x86-full-fast-hotplug.json | 115 ++++++++++++++++++
 .../qemumonitorjson-cpuinfo-x86-full-fast.data     | 109 +++++++++++++++++
 .../qemumonitorjson-cpuinfo-x86-node-full.data     |   2 +
 tests/qemumonitorjsontest.c                        | 123 +++++++++++++++----
 tests/qemumonitortestutils.c                       |   7 ++
 tests/qemumonitortestutils.h                       |   1 +
 23 files changed, 706 insertions(+), 58 deletions(-)
 create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-s390-fast-cpus.json
 create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-s390-fast-hotplug.json
 create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-s390-fast.data
 create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-x86-full-fast-cpus.json
 create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-x86-full-fast-hotplug.json
 create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-cpuinfo-x86-full-fast.data

-- 
1.9.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux