[libvirt] [PATCH v4 0/8] Add perf and Intel CMT feature support

Qiaowei Ren qiaowei.ren at intel.com
Mon Mar 28 13:30:25 UTC 2016


The series mainly adds Intel CMT feature support into libvirt. CMT is
new introduced PQos (Platform Qos) feature to monitor the usage of
cache by applications running on the platform.

Currently CMT patches has been merged into Linux kernel mainline.
The CMT implementation in Linux kernel is based on perf mechanism and
there is no support for perf in libvirt, and so this series firstly
add perf support into libvirt, including two public API and a set of
util interfaces. And based on these APIs and interfaces, thie series
implements CMT perf event support.

Current state:

* 1/8 - perf: add new public APIs for perf event
        - ACKed by Daniel

* 2/8 - perf: implement the remote protocol for perf event
        - ACKed by Daniel

* 3/8 - perf: implement a set of util functions for perf event
        - ACKed by Daniel

* 4/8 - qemu_driver: add support to perf event
        - restart perf in qemuProcessReconnect and qemuProcessAttach
          in patch 6/8

* 5/8 - perf: add new xml element
        - ACKed by Daniel

* 6/8 - perf: reenable perf events when libvirtd restart
        - add qemuDomainPerfRestart() into qemuProcessReconnect() and
          qemuProcessAttach()

* 7/8 - virsh: implement new command to support perf
        - ACKed by Daniel

* 8/8 - virsh: extend domstats command
        - ACKed by Daniel

TODO:
1. add support for new APIs into libvirt-python library.

Changes since v1:
  * change perf APIs implementation to match new style of the API.
  * add new xml element
  * reenable all perf events previously enabled when libvirtd daemon
    restart.
  * redesign perf util functions.

Changes since v2:
  * add an example XML file to the test suite.
  * add virPerfReadEvent().
  * change 'perf' xml element to new style.
  * change 'perf' command to new stype.

Changes since v3:
  * move qemuDomainPerfRestart() into qemuProcessReconnect() and
    qemuProcessAttach().

Qiaowei Ren (8):
  perf: add new public APIs for perf event
  perf: implement the remote protocol for perf event
  perf: implement a set of util functions for perf event
  qemu_driver: add support to perf event
  perf: add new xml element
  perf: reenable perf events when libvirtd restart
  virsh: implement new command to support perf
  virsh: extend domstats command

 daemon/remote.c                               |  47 ++++
 docs/schemas/domaincommon.rng                 |  27 +++
 include/libvirt/libvirt-domain.h              |  19 ++
 include/libvirt/virterror.h                   |   2 +
 src/Makefile.am                               |   1 +
 src/conf/domain_conf.c                        | 111 ++++++++++
 src/conf/domain_conf.h                        |  10 +
 src/driver-hypervisor.h                       |  12 +
 src/libvirt-domain.c                          |  93 ++++++++
 src/libvirt_private.syms                      |  12 +
 src/libvirt_public.syms                       |   2 +
 src/qemu/qemu_domain.h                        |   3 +
 src/qemu/qemu_driver.c                        | 159 +++++++++++++
 src/qemu/qemu_process.c                       |  44 ++++
 src/remote/remote_driver.c                    |  39 ++++
 src/remote/remote_protocol.x                  |  30 ++-
 src/remote_protocol-structs                   |  18 ++
 src/util/virerror.c                           |   2 +
 src/util/virperf.c                            | 307 ++++++++++++++++++++++++++
 src/util/virperf.h                            |  63 ++++++
 tests/domainschemadata/domain-perf-simple.xml |  20 ++
 tools/virsh-domain-monitor.c                  |   7 +
 tools/virsh-domain.c                          | 128 +++++++++++
 tools/virsh.pod                               |  27 ++-
 24 files changed, 1180 insertions(+), 3 deletions(-)
 create mode 100644 src/util/virperf.c
 create mode 100644 src/util/virperf.h
 create mode 100644 tests/domainschemadata/domain-perf-simple.xml

-- 
1.9.1




More information about the libvir-list mailing list