On 10/13/2016 07:42 AM, Viktor Mihajlovski wrote:
As a result of the discussions on
https://www.redhat.com/archives/libvir-list/2016-October/msg00531.html:
In order to be able to report the per VCPU halted condition as returned
by the QEMU monitor this series extends the VCPU-specific domain
statistics with a vcpu.n.halted value.
This is done by
- extending the monitor to pass back the halted condition for the vcpus
- adding a new field to the private domain vcpu object reflecting the
halted condition for the vcpu
- modifying the driver code to report the new VCPU domain statistics value
The halted condition is however not recorded in the internal XML format, since
the state can change asynchronously (without notification).
Patches 1/4 and 2/4 are taken without modifications from the original
posting. In 4/4 I've only updated virsh.pod as I didn't want to
touch libvirt-domain.c in this context just for documentation purposes.
Viktor Mihajlovski (4):
qemu: Add monitor support for CPU halted state
qemu: Add domain support for VCPU halted state
qemu: add vcpu.n.halted to vcpu domain stats
doc: update virsh domstats documentation for vcpu statistics
src/qemu/qemu_domain.c | 66 ++++++++++++++++++++++++++++++++++++++++++++
src/qemu/qemu_domain.h | 5 ++++
src/qemu/qemu_driver.c | 34 ++++++++++++++++++++---
src/qemu/qemu_monitor.c | 6 +++-
src/qemu/qemu_monitor.h | 3 ++
src/qemu/qemu_monitor_json.c | 3 ++
src/qemu/qemu_monitor_text.c | 8 +++++-
tests/qemumonitorjsontest.c | 8 +++---
tools/virsh.pod | 7 +++++
9 files changed, 130 insertions(+), 10 deletions(-)
The series looks good to me - do you think it's worthwhile to mention
anywhere in virsh.pod that the "halted" could mean "really halted" or
"not scheduled" or "not actively processing" depending on
architecture?
(and how best to say it).
I can tweak virsh.pod before pushing based on your or others
feedback/thoughts.
Tks -
John