libvirt/src/qemu
Daniel P. Berrange 511e7c5bba qemu: add reporting of vCPU wait time
The VIR_DOMAIN_STATS_VCPU flag to virDomainListGetStats
enables reporting of stats about vCPUs. Currently we
only report the cumulative CPU running time and the
execution state.

This adds reporting of the wait time - time the vCPU
wants to run, but the host scheduler has something else
running ahead of it.

The data is reported per-vCPU eg

$ virsh domstats --vcpu demo
 Domain: 'demo'
   vcpu.current=4
   vcpu.maximum=4
   vcpu.0.state=1
   vcpu.0.time=1420000000
   vcpu.0.wait=18403928
   vcpu.1.state=1
   vcpu.1.time=130000000
   vcpu.1.wait=10612111
   vcpu.2.state=1
   vcpu.2.time=110000000
   vcpu.2.wait=12759501
   vcpu.3.state=1
   vcpu.3.time=90000000
   vcpu.3.wait=21825087

In implementing this I notice our reporting of CPU execute
time has very poor granularity, since we are getting it
from /proc/$PID/stat. As a future enhancement we should
prefer to get CPU execute time from /proc/$PID/schedstat
or /proc/$PID/sched (if either exist on the running kernel)

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2016-01-26 14:34:23 +00:00
..
EVENTHANDLERS.txt qemu: add short document on qemu event handlers 2014-10-06 13:50:57 -04:00
libvirtd_qemu.aug qemu: add support for sending QEMU stdout/stderr to virtlogd 2015-11-26 14:30:16 +00:00
MIGRATION.txt qemu: Implement migration job phases 2011-07-27 08:45:09 -06:00
qemu_agent.c qemu: Print better warning in qemuAgentNotifyEvent 2016-01-15 08:33:49 +01:00
qemu_agent.h qemu: change qemuFindAgentConfig return type 2016-01-11 17:17:52 +01:00
qemu_blockjob.c qemuDomainEventQueue: Check if event is non-NULL 2015-09-18 13:50:03 +02:00
qemu_blockjob.h qemu: Use domain condition for synchronous block jobs 2015-06-19 15:15:10 +02:00
qemu_capabilities.c qemu: add capability check for memballoon 'deflate-on-oom' feature 2016-01-12 10:48:21 -05:00
qemu_capabilities.h qemu: add capability check for memballoon 'deflate-on-oom' feature 2016-01-12 10:48:21 -05:00
qemu_capspriv.h Implement infrastracture for mocking up QEMU capabilities cache 2015-09-22 13:56:59 +02:00
qemu_cgroup.c cgroup: Fix possible bug as a result of code motion for vcpu cgroup setup 2016-01-14 11:02:53 -05:00
qemu_cgroup.h rename qemuSetupHostdevCGroup to qemuSetupHostdevCgroup 2015-11-23 13:52:18 +01:00
qemu_command.c qemu: add support of optional 'autodeflate' attribute 2016-01-12 10:48:21 -05:00
qemu_command.h qemu: add bootindex option to hostdev network interface commandline 2015-12-15 10:57:27 -05:00
qemu_conf.c qemu: add support for sending QEMU stdout/stderr to virtlogd 2015-11-26 14:30:16 +00:00
qemu_conf.h sysconf: Include unistd.h 2015-12-24 18:03:50 +01:00
qemu_domain.c qemu: auto-add a USB2 controller set for Q35 machines 2016-01-11 13:21:10 -05:00
qemu_domain.h qemu: change qemuFindAgentConfig return type 2016-01-11 17:17:52 +01:00
qemu_driver.c qemu: add reporting of vCPU wait time 2016-01-26 14:34:23 +00:00
qemu_driver.h Change file names in comments to match the files they are in 2014-03-10 14:26:04 +01:00
qemu_hostdev.c qemu: hostdev: Introduce qemuHostdevUpdateActiveDomainDevices() 2015-10-26 13:50:35 +01:00
qemu_hostdev.h qemu: hostdev: Introduce qemuHostdevUpdateActiveDomainDevices() 2015-10-26 13:50:35 +01:00
qemu_hotplug.c Remove dead code from qemuDomainAttachControllerDevice 2015-12-17 16:57:25 +01:00
qemu_hotplug.h qemu: Implement memory device hotunplug 2015-03-23 14:41:14 +01:00
qemu_hotplugpriv.h qemu: Let tests override waiting time for device unplug 2013-08-26 16:09:55 +02:00
qemu_interface.c qemu: add udp interface support 2015-09-02 10:17:50 +02:00
qemu_interface.h qemu: add a qemuInterfaceStopDevices(), called when guest CPUs stop 2014-12-13 22:20:28 -05:00
qemu_migration.c virDomainMigrateUnmanagedParams: Don't blindly dereference @dconnuri 2016-01-09 18:44:44 +01:00
qemu_migration.h qemu: Use -incoming defer for migrations 2015-11-19 09:41:23 +01:00
qemu_monitor_json.c qemu: Add support for migration iteration event 2016-01-21 16:36:08 +01:00
qemu_monitor_json.h qemu: Rename qemuMonitorMigrationStatus struct 2016-01-08 18:18:58 +01:00
qemu_monitor_text.c qemu: snapshot: Correctly report qemu error on 'savevm' 2016-01-25 07:21:25 +01:00
qemu_monitor_text.h qemu: Rename qemuMonitorMigrationStatus struct 2016-01-08 18:18:58 +01:00
qemu_monitor.c qemu: Add support for migration iteration event 2016-01-21 16:36:08 +01:00
qemu_monitor.h qemu: Add support for migration iteration event 2016-01-21 16:36:08 +01:00
qemu_process.c qemu: process: Disallow VMs with 0 vcpus 2016-01-25 17:45:09 +01:00
qemu_process.h qemu: Fix NBD migration with default listenAddress 2016-01-08 10:39:20 +01:00
qemu_processpriv.h qemu: Export qemuProcessHandleDeviceDeleted for tests 2013-08-26 16:09:55 +02:00
qemu.conf qemu: add support for sending QEMU stdout/stderr to virtlogd 2015-11-26 14:30:16 +00:00
test_libvirtd_qemu.aug.in qemu: add support for sending QEMU stdout/stderr to virtlogd 2015-11-26 14:30:16 +00:00
THREADS.txt There is no virDomainFindBy{ID, Name, UUID} anymore 2015-08-03 13:08:00 +02:00