[libvirt] [PATCH 04/10] test: add test case for resctrl monitor

2018-08-27 Thread Wang Huaqiang
Signed-off-by: Wang Huaqiang --- .../linux-resctrl/resctrl/info/L3_MON/max_threshold_occupancy | 1 + .../vircaps2xmldata/linux-resctrl/resctrl/info/L3_MON/mon_features | 3 +++ tests/vircaps2xmldata/linux-resctrl/resctrl/info/L3_MON/num_rmids | 1 + tests/vircaps2xmldata/vircaps-x86_64

[libvirt] [PATCH 02/10] util: add interface retrieving CMT capability

2018-08-27 Thread Wang Huaqiang
Introduce function for reporting CMT capability through going through files under /sys/fs/info/L3_MON. This patch is co-work with later patches and report these information to domain. Signed-off-by: Wang Huaqiang --- src/conf/capabilities.c | 6 ++- src/conf/capabilities.h | 1 + src/util

[libvirt] [PATCH 01/10] conf: Renamed 'controlBuf' to 'childrenBuf'

2018-08-27 Thread Wang Huaqiang
To add CMT/MBM feature and let code be consistent in later patches, renaming variable name from 'controlBuf' to 'childrenBuf', locates in functions 'virCapabilitiesFormatCaches' and 'virCapabilitiesFormatMemoryBandwidth'. Signed-off-by: Wang Huaqiang ---

[libvirt] [PATCH 06/10] util: Introduce resctrl monitor for CMT

2018-08-27 Thread Wang Huaqiang
+}; struct _virResctrlAlloc { virObject parent; @@ -276,6 +289,12 @@ struct _virResctrlAlloc { virResctrlAllocMemBWPtr mem_bw; + virResctrlAllocMonPtr *monitors; + size_t nmonitors; } Signed-off-by: Wang

[libvirt] [PATCH 03/10] conf: Add CMT capability to host

2018-08-27 Thread Wang Huaqiang
Signed-off-by: Wang Huaqiang --- docs/schemas/capability.rng | 28 src/conf/capabilities.c | 17 + 2 files changed, 45 insertions(+) diff --git a/docs/schemas/capability.rng b/docs/schemas/capability.rng index d61515c..67498f1 10064

[libvirt] [PATCH 08/10] conf: introduce resctrl monitor group in domain

2018-08-27 Thread Wang Huaqiang
s monitoring group for all vcpus belonging to current allocation. 3. monitoring group for vcpu(s) that does not have dedicated allocation group: e.g. "" creates a monitoring group but no resource control applied to it. + +

[libvirt] [PATCH 09/10] qemu: Introduce resctrl monitoring group

2018-08-27 Thread Wang Huaqiang
Resource monitoring group monitors the resource consumption, cache and memory bandwidth, of particular resctrl allocation. Introduce the resctrl monitoring group. Signed-off-by: Wang Huaqiang --- src/qemu/qemu_process.c | 40 ++-- 1 file changed, 38

[libvirt] [PATCH 07/10] conf: refactor virDomainResctrlAppend

2018-08-27 Thread Wang Huaqiang
. Signed-off-by: Wang Huaqiang --- src/conf/domain_conf.c | 48 ++-- 1 file changed, 34 insertions(+), 14 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index bde9fef..9a65655 100644 --- a/src/conf/domain_conf.c +++ b/src/conf

[libvirt] [PATCH 05/10] util: resctrl: refactoring some functions

2018-08-27 Thread Wang Huaqiang
Some code, in virresctrl.c, manupulating the file objects of resctrlfs could be reused for cache monitor interfaces. This patch refactor these functions for purpose of reusing code in later patch: virResctrlAllocDeterminePath virResctrlAllocCreate virResctrlAddPID Signed-off-by: Wang Huaqiang

[libvirt] [PATCH 00/10] Introduce x86 Cache Monitoring Technology (CMT)

2018-08-27 Thread Wang Huaqiang
unt=2 + cpu.cache.1.bank.0.id=0 cpu.cache.1.bank.0.bytes=17571840 + cpu.cache.1.bank.1.id=1 cpu.cache.1.bank.1.bytes=29106176 Wang Huaqiang (10): conf: Renamed 'controlBuf' to 'childrenBuf' util: add interface retrieving CMT capability conf: Add CMT cap

[libvirt] [PATCH 10/10] qemu: Report cache occupancy (CMT) with domstats

2018-08-27 Thread Wang Huaqiang
bank.1.bytes=5586944 cpu.cache.1.name=vcpus_4-6 cpu.cache.1.vcpus=4,5,6 cpu.cache.1.bank.count=2 cpu.cache.1.bank.0.id=0 cpu.cache.1.bank.0.bytes=17571840 cpu.cache.1.bank.1.id=1 cpu.cache.1.bank.1.bytes=29106176 Signed-off-by: Wang Huaqiang --- src/libv

Re: [libvirt] [PATCH 01/10] conf: Renamed 'controlBuf' to 'childrenBuf'

2018-09-06 Thread Wang, Huaqiang
> -Original Message- > From: John Ferlan [mailto:jfer...@redhat.com] > Sent: Wednesday, September 5, 2018 7:58 PM > To: Wang, Huaqiang ; libvir-list@redhat.com > Cc: Feng, Shaohe ; Niu, Bing ; > Ding, Jian-feng ; Zang, Rui > Subject: Re: [libvirt] [PATCH

Re: [libvirt] [PATCH 02/10] util: add interface retrieving CMT capability

2018-09-07 Thread Wang, Huaqiang
> -Original Message- > From: John Ferlan [mailto:jfer...@redhat.com] > Sent: Wednesday, September 5, 2018 7:58 PM > To: Wang, Huaqiang ; libvir-list@redhat.com > Cc: Feng, Shaohe ; Niu, Bing ; > Ding, Jian-feng ; Zang, Rui > Subject: Re: [libvirt] [PATCH 02/10

Re: [libvirt] [PATCH 03/10] conf: Add CMT capability to host

2018-09-07 Thread Wang, Huaqiang
> -Original Message- > From: John Ferlan [mailto:jfer...@redhat.com] > Sent: Wednesday, September 5, 2018 7:59 PM > To: Wang, Huaqiang ; libvir-list@redhat.com > Cc: Feng, Shaohe ; Niu, Bing ; > Ding, Jian-feng ; Zang, Rui > Subject: Re: [libvirt] [PATCH 03/10] con

Re: [libvirt] [PATCH 04/10] test: add test case for resctrl monitor

2018-09-07 Thread Wang, Huaqiang
> -Original Message- > From: John Ferlan [mailto:jfer...@redhat.com] > Sent: Wednesday, September 5, 2018 7:59 PM > To: Wang, Huaqiang ; libvir-list@redhat.com > Cc: Feng, Shaohe ; Niu, Bing ; > Ding, Jian-feng ; Zang, Rui > Subject: Re: [libvirt] [PATCH 04/10] te

Re: [libvirt] [PATCH 05/10] util: resctrl: refactoring some functions

2018-09-07 Thread Wang, Huaqiang
> -Original Message- > From: John Ferlan [mailto:jfer...@redhat.com] > Sent: Wednesday, September 5, 2018 10:49 PM > To: Wang, Huaqiang ; libvir-list@redhat.com > Cc: Feng, Shaohe ; Niu, Bing ; > Ding, Jian-feng ; Zang, Rui > Subject: Re: [libvirt] [PATCH

Re: [libvirt] [PATCH 06/10] util: Introduce resctrl monitor for CMT

2018-09-10 Thread Wang, Huaqiang
> -Original Message- > From: John Ferlan [mailto:jfer...@redhat.com] > Sent: Wednesday, September 5, 2018 11:00 PM > To: Wang, Huaqiang ; libvir-list@redhat.com > Cc: Feng, Shaohe ; Niu, Bing ; > Ding, Jian-feng ; Zang, Rui > Subject: Re: [libvirt] [PATCH 06/10] ut

Re: [libvirt] [PATCH 07/10] conf: refactor virDomainResctrlAppend

2018-09-10 Thread Wang, Huaqiang
> -Original Message- > From: John Ferlan [mailto:jfer...@redhat.com] > Sent: Wednesday, September 5, 2018 11:49 PM > To: Wang, Huaqiang ; libvir-list@redhat.com > Cc: Feng, Shaohe ; Niu, Bing ; > Ding, Jian-feng ; Zang, Rui > Subject: Re: [libvirt] [PATCH

Re: [libvirt] [PATCH 08/10] conf: introduce resctrl monitor group in domain

2018-09-10 Thread Wang, Huaqiang
> -Original Message- > From: John Ferlan [mailto:jfer...@redhat.com] > Sent: Thursday, September 6, 2018 12:39 AM > To: Wang, Huaqiang ; libvir-list@redhat.com > Cc: Feng, Shaohe ; Niu, Bing ; > Ding, Jian-feng ; Zang, Rui > Subject: Re: [libvirt] [PATCH 08/10] co

Re: [libvirt] [PATCH 02/10] util: add interface retrieving CMT capability

2018-09-10 Thread Wang, Huaqiang
> -Original Message- > From: John Ferlan [mailto:jfer...@redhat.com] > Sent: Saturday, September 8, 2018 12:49 AM > To: Wang, Huaqiang ; libvir-list@redhat.com > Cc: Feng, Shaohe ; Niu, Bing ; > Ding, Jian-feng ; Zang, Rui > Subject: Re: [libvirt] [PATCH 02/10

Re: [libvirt] [PATCH 03/10] conf: Add CMT capability to host

2018-09-10 Thread Wang, Huaqiang
> -Original Message- > From: John Ferlan [mailto:jfer...@redhat.com] > Sent: Saturday, September 8, 2018 1:11 AM > To: Wang, Huaqiang ; libvir-list@redhat.com > Cc: Feng, Shaohe ; Niu, Bing ; > Ding, Jian-feng ; Zang, Rui > Subject: Re: [libvirt] [PATCH 03/10] con

Re: [libvirt] [PATCH 05/10] util: resctrl: refactoring some functions

2018-09-10 Thread Wang, Huaqiang
> -Original Message- > From: John Ferlan [mailto:jfer...@redhat.com] > Sent: Saturday, September 8, 2018 1:41 AM > To: Wang, Huaqiang ; libvir-list@redhat.com > Cc: Feng, Shaohe ; Niu, Bing ; > Ding, Jian-feng ; Zang, Rui > Subject: Re: [libvirt] [PATCH

Re: [libvirt] [PATCH 04/10] test: add test case for resctrl monitor

2018-09-10 Thread Wang, Huaqiang
> -Original Message- > From: John Ferlan [mailto:jfer...@redhat.com] > Sent: Saturday, September 8, 2018 1:14 AM > To: Wang, Huaqiang ; libvir-list@redhat.com > Cc: Feng, Shaohe ; Niu, Bing ; > Ding, Jian-feng ; Zang, Rui > Subject: Re: [libvirt] [PATCH 04/10] te

Re: [libvirt] [PATCH 02/10] util: add interface retrieving CMT capability

2018-09-14 Thread Wang, Huaqiang
> -Original Message- > From: John Ferlan [mailto:jfer...@redhat.com] > Sent: Wednesday, September 12, 2018 1:24 AM > To: Wang, Huaqiang ; libvir-list@redhat.com > Cc: Feng, Shaohe ; Niu, Bing ; > Ding, Jian-feng ; Zang, Rui > Subject: Re: [libvirt]

[libvirt] [PATCHv2 0/4] Introduce x86 RDT (CMT&MBM) host capability

2018-09-14 Thread Wang Huaqiang
... Changes since v1: - Introduced MBM capability. - Capability layout changed * Moved from cahe to * Renamed to - Document for 'reuseThreshold' changed. - Introduced API virResctrlInfoGetMonitorPrefix - Added more tests, covering standalone CMT, fake new f

[libvirt] [PATCHv2 1/4] util: Introduce monitor capability interface

2018-09-14 Thread Wang Huaqiang
last level cache occupancy and the utilization of memory bandwidth. Signed-off-by: Wang Huaqiang --- src/util/virresctrl.c | 124 ++ 1 file changed, 124 insertions(+) diff --git a/src/util/virresctrl.c b/src/util/virresctrl.c index 4b5442f

[libvirt] [PATCHv2 3/4] conf: Refactor memory bandwidth capability structure

2018-09-14 Thread Wang Huaqiang
Move memory bandwidth capability nodes into one data structure, this allows us to add a monitor for memory bandwidth. Signed-off-by: Wang Huaqiang --- src/conf/capabilities.c | 22 ++ src/conf/capabilities.h | 10 -- 2 files changed, 18 insertions(+), 14 deletions

[libvirt] [PATCHv2 4/4] conf: Introduce RDT monitor host capability

2018-09-14 Thread Wang Huaqiang
: ... ... Signed-off-by: Wang Huaqiang --- docs/schemas/capability.rng| 37 ++- src/conf/capabilities.c| 68 src/conf/capabilities.h| 4 + src/libvirt_private.syms

[libvirt] [PATCHv2 2/4] conf: Refactor cache bank capability structure

2018-09-14 Thread Wang Huaqiang
Move all cache banks into one data structure, this allows us to add other cache component, such as cache monitor. Signed-off-by: Wang Huaqiang --- src/conf/capabilities.c | 36 +--- src/conf/capabilities.h | 10 -- 2 files changed, 25 insertions(+), 21

Re: [libvirt] [PATCHv2 1/4] util: Introduce monitor capability interface

2018-09-20 Thread Wang, Huaqiang
> -Original Message- > From: John Ferlan [mailto:jfer...@redhat.com] > Sent: Wednesday, September 19, 2018 3:39 AM > To: Wang, Huaqiang ; libvir-list@redhat.com > Cc: Feng, Shaohe ; Niu, Bing ; > Ding, Jian-feng ; Zang, Rui > Subject: Re: [PATCHv2 1/4] util: Introdu

Re: [libvirt] [PATCHv2 4/4] conf: Introduce RDT monitor host capability

2018-09-20 Thread Wang, Huaqiang
> -Original Message- > From: John Ferlan [mailto:jfer...@redhat.com] > Sent: Wednesday, September 19, 2018 3:47 AM > To: Wang, Huaqiang ; libvir-list@redhat.com > Cc: Feng, Shaohe ; Niu, Bing ; > Ding, Jian-feng ; Zang, Rui > Subject: Re: [PATCHv2 4/4] conf: Intro

[libvirt] [PATCHv3 0/4] Introduce x86 RDT (CMT&MBM) host capability

2018-09-20 Thread Wang Huaqiang
hanged. - Introduced API virResctrlInfoGetMonitorPrefix - Added more tests, covering standalone CMT, fake new feature. - Creating CMT resource control group will be subsequent job. Wang Huaqiang (4): util: Introduce monitor capability interface conf: Refactor cache bank capability struc

[libvirt] [PATCHv3 2/4] conf: Refactor cache bank capability structure

2018-09-20 Thread Wang Huaqiang
Move all cache banks into one data structure, this allows us to add other cache component, such as cache monitor. Signed-off-by: Wang Huaqiang Reviewed-by: John Ferlan --- src/conf/capabilities.c | 36 +--- src/conf/capabilities.h | 10 -- 2 files

[libvirt] [PATCHv3 1/4] util: Introduce monitor capability interface

2018-09-20 Thread Wang Huaqiang
the last level cache occupancy and the utilization of memory bandwidth. Signed-off-by: Wang Huaqiang Reviewed-by: John Ferlan --- src/util/virresctrl.c | 126 ++ 1 file changed, 126 insertions(+) diff --git a/src/util/virresctrl.c b/src/util

[libvirt] [PATCHv3 3/4] conf: Refactor memory bandwidth capability structure

2018-09-20 Thread Wang Huaqiang
Move memory bandwidth capability nodes into one data structure, this allows us to add a monitor for memory bandwidth. Signed-off-by: Wang Huaqiang Reviewed-by: John Ferlan --- src/conf/capabilities.c | 22 ++ src/conf/capabilities.h | 10 -- 2 files changed, 18

[libvirt] [PATCHv3 4/4] conf: Introduce RDT monitor host capability

2018-09-20 Thread Wang Huaqiang
: ... ... For MBM, the capability is shown like this: ... ... Signed-off-by: Wang Huaqiang --- docs/schemas/capability.rng| 37 ++- src/conf/capabilities.c

Re: [libvirt] [PATCHv3 1/4] util: Introduce monitor capability interface

2018-09-20 Thread Wang, Huaqiang
> -Original Message- > From: John Ferlan [mailto:jfer...@redhat.com] > Sent: Friday, September 21, 2018 12:16 AM > To: Wang, Huaqiang ; libvir-list@redhat.com > Cc: Feng, Shaohe ; Niu, Bing ; > Ding, Jian-feng ; Zang, Rui > Subject: Re: [PATCHv3 1/4] util: Introdu

[libvirt] [PATCHv4 05/18] util: Refactor code for determining allocation path

2018-09-30 Thread Wang Huaqiang
The code for determining resctrl allocation path could be reused for monitor. Refactor it for reusing. Signed-off-by: Wang Huaqiang --- src/util/virresctrl.c | 33 +++-- 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/src/util/virresctrl.c b/src/util

[libvirt] [PATCHv4 00/18] Introduce x86 Cache Monitoring Technology (CMT)

2018-09-30 Thread Wang Huaqiang
* Moved from cahe to * Renamed to - Document for 'reuseThreshold' changed. - Introduced API virResctrlInfoGetMonitorPrefix - Added more tests, covering standalone CMT, fake new feature. - Creating CMT resource control group will be subsequent job. Wang Huaqiang (18): docs

[libvirt] [PATCHv4 02/18] util: Introduce resctrl monitor for CMT

2018-09-30 Thread Wang Huaqiang
Cache Monitoring Technology (aka CMT) provides the capability to report cache utilization information of system task. This patch introduces the concept of resctrl monitor through data structure virResctrlMonitor. Signed-off-by: Wang Huaqiang --- src/libvirt_private.syms | 1 + src/util

[libvirt] [PATCHv4 03/18] util: Refactor code for adding PID to the resource group

2018-09-30 Thread Wang Huaqiang
The code of adding PID to the allocation could be reused, refactor it for later reusing. Signed-off-by: Wang Huaqiang --- src/util/virresctrl.c | 26 +- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/src/util/virresctrl.c b/src/util/virresctrl.c index

[libvirt] [PATCHv4 04/18] util: Add interface for adding PID to monitor

2018-09-30 Thread Wang Huaqiang
Add interface for adding task PID to monitor. Signed-off-by: Wang Huaqiang --- src/libvirt_private.syms | 1 + src/util/virresctrl.c| 8 src/util/virresctrl.h| 4 3 files changed, 13 insertions(+) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index

[libvirt] [PATCHv4 01/18] docs: Refactor schemas to support default allocation

2018-09-30 Thread Wang Huaqiang
such kind of task. Refactoring schemas docs and APIs to create a default cache allocation by allowing the appearance of an with no element. Signed-off-by: Wang Huaqiang --- docs/schemas/domaincommon.rng | 4 ++-- src/conf/domain_conf.c| 32 +++- src

[libvirt] [PATCHv4 07/18] util: Refactor code for creating resctrl group

2018-09-30 Thread Wang Huaqiang
The code for creating resctrl allocation group could be reused for monitoring group, refactor it for reusing in the later patch. Signed-off-by: Wang Huaqiang --- src/util/virresctrl.c | 37 +++-- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/src

[libvirt] [PATCHv4 08/18] util: Add interface for creating monitor group

2018-09-30 Thread Wang Huaqiang
Add interface for creating the resource monitoring group according to '@virResctrlMonitor->path'. Signed-off-by: Wang Huaqiang --- src/libvirt_private.syms | 1 + src/util/virresctrl.c| 28 src/util/virresctrl.h| 6 ++ 3 files changed,

[libvirt] [PATCHv4 18/18] qemu: Report cache occupancy (CMT) with domstats

2018-09-30 Thread Wang Huaqiang
cpu.cache.1.vcpus=4,5,6 cpu.cache.1.bank.count=2 cpu.cache.1.bank.0.id=0 cpu.cache.1.bank.0.bytes=17571840 cpu.cache.1.bank.1.id=1 cpu.cache.1.bank.1.bytes=29106176 Signed-off-by: Wang Huaqiang --- src/qemu

[libvirt] [PATCHv4 06/18] util: Add monitor interface to determine path

2018-09-30 Thread Wang Huaqiang
Add interface for resctrl monitor to determine the path. Signed-off-by: Wang Huaqiang --- src/libvirt_private.syms | 1 + src/util/virresctrl.c| 32 src/util/virresctrl.h| 3 +++ 3 files changed, 36 insertions(+) diff --git a/src/libvirt_private.syms

[libvirt] [PATCHv4 14/18] Util: Add function for checking if monitor is running

2018-09-30 Thread Wang Huaqiang
Check monitor status by checking the PIDs are in file 'task' or not. Signed-off-by: Wang Huaqiang --- src/libvirt_private.syms | 1 + src/util/virresctrl.c| 84 +++- src/util/virresctrl.h| 4 +++ 3 files changed, 88 insertions(+),

[libvirt] [PATCHv4 13/18] conf: Add resctrl monitor configuration

2018-09-30 Thread Wang Huaqiang
ill have such kind of XML layout: For other type monitor, the XML layout will be something like: Signed-off-by: Wang Huaqiang --- docs/schemas/domaincommon.rng | 10 + src/conf/domain_conf.c

[libvirt] [PATCHv4 15/18] qemu: enable resctrl monitor in qemu

2018-09-30 Thread Wang Huaqiang
Add functions for creating, destroying, reconnecting resctrl monitor in qemu according to the configuration in domain XML. Signed-off-by: Wang Huaqiang --- src/qemu/qemu_process.c | 41 - 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/src

[libvirt] [PATCHv4 09/18] util: Add more interfaces for resctrl monitor

2018-09-30 Thread Wang Huaqiang
Add interfaces monitor group to support operations such as add PID, set ID, remove group ... etc. The interface for getting cache occupancy information from the monitor is also added. Signed-off-by: Wang Huaqiang --- src/libvirt_private.syms | 6 ++ src/util/virresctrl.c| 209

[libvirt] [PATCHv4 16/18] conf: Add a 'id' to virDomainResctrlDef

2018-09-30 Thread Wang Huaqiang
Adding element 'id' to virDomainResctrlDef. This 'id' reflects the attribute 'id' of of element 'cachetune in XML. virResctrlAlloc.id is a copy of virDomanResctrlDef.id. Signed-off-by: Wang Huaqiang --- src/conf/domain_conf.c | 20 src

[libvirt] [PATCHv4 10/18] util: Introduce default monitor

2018-09-30 Thread Wang Huaqiang
the concept of default monitor, which represents the particular monitoring group that created along with the creation of allocation group. Default monitor shares the common 'vcpu' list with the allocation. Signed-off-by: Wang Huaqiang --- src/libvirt_private.syms | 1 + src/util/vi

[libvirt] [PATCHv4 11/18] conf: Refactor code for matching existing resctrls

2018-09-30 Thread Wang Huaqiang
Refactoring the code of matching the new resctrl with existing resctrl groups. Add the virObjectRef action into function virDomainResctrlVcpuMatch. Signed-off-by: Wang Huaqiang --- src/conf/domain_conf.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/conf

[libvirt] [PATCHv4 12/18] conf: Refactor virDomainResctrlAppend

2018-09-30 Thread Wang Huaqiang
Refactor virDomainResctrlAppend to facilitate virDomainResctrlDef with the capability to hold more element. Signed-off-by: Wang Huaqiang --- src/conf/domain_conf.c | 64 +++--- 1 file changed, 45 insertions(+), 19 deletions(-) diff --git a/src/conf

[libvirt] [PATCHv4 17/18] qemu: refactor qemuDomainGetStatsCpu

2018-09-30 Thread Wang Huaqiang
Refactoring qemuDomainGetStatsCpu, make it possible to add more CPU statistics. Signed-off-by: Wang Huaqiang --- src/qemu/qemu_driver.c | 45 ++--- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu

Re: [libvirt] [PATCHv2 1/4] util: Introduce monitor capability interface

2018-10-09 Thread Wang, Huaqiang
> -Original Message- > From: Ján Tomko [mailto:jto...@redhat.com] > Sent: Friday, October 5, 2018 10:42 PM > To: John Ferlan > Cc: Wang, Huaqiang ; libvir-list@redhat.com; Feng, > Shaohe ; Niu, Bing ; Ding, Jian- > feng ; Zang, Rui > Subject: Re: [lib

Re: [libvirt] [PATCHv2 1/4] util: Introduce monitor capability interface

2018-10-09 Thread Wang, Huaqiang
Hi Jano, Recognized there was already a commit for a fixing: 7bff646d71aa90ed8727ef99be29d6d2ab5d8f06. And now I got your idea. Thanks Huaqiang > -Original Message- > From: Wang, Huaqiang > Sent: Tuesday, October 9, 2018 5:55 PM > To: 'Ján Tomko' ; John Fer

[libvirt] [PATCHv5 01/19] docs: Refactor schemas to support default allocation

2018-10-09 Thread Wang Huaqiang
such kind of task. Refactoring schemas docs and APIs to create a default cache allocation by allowing the appearance of an with no element. Signed-off-by: Wang Huaqiang --- docs/formatdomain.html.in | 4 ++-- docs/schemas/domaincommon.rng | 4 ++-- src/conf/domain_conf.c

[libvirt] [PATCHv5 05/19] util: Refactor code for determining allocation path

2018-10-09 Thread Wang Huaqiang
The code for determining resctrl allocation path could be reused for monitor. Refactor it for reusing. Signed-off-by: Wang Huaqiang --- src/util/virresctrl.c | 33 +++-- 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/src/util/virresctrl.c b/src/util

[libvirt] [PATCHv5 04/19] util: Add interface for adding PID to monitor

2018-10-09 Thread Wang Huaqiang
Add interface for adding task PID to monitor. Signed-off-by: Wang Huaqiang --- src/libvirt_private.syms | 1 + src/util/virresctrl.c| 8 src/util/virresctrl.h| 4 3 files changed, 13 insertions(+) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index

[libvirt] [PATCHv5 11/19] conf: Refactor code for matching existing resctrls

2018-10-09 Thread Wang Huaqiang
Refactoring the code of matching the new resctrl with existing resctrl groups. Add the virObjectRef action into function virDomainResctrlVcpuMatch. Signed-off-by: Wang Huaqiang --- src/conf/domain_conf.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/conf

[libvirt] [PATCHv5 00/19] Introduce x86 Cache Monitoring Technology (CMT)

2018-10-09 Thread Wang Huaqiang
etMonitorPrefix - Added more tests, covering standalone CMT, fake new feature. - Creating CMT resource control group will be subsequent job. Wang Huaqiang (19): docs: Refactor schemas to support default allocation util: Introduce resctrl monitor for CMT util: Refactor code for adding PID

[libvirt] [PATCHv5 03/19] util: Refactor code for adding PID to the resource group

2018-10-09 Thread Wang Huaqiang
The code of adding PID to the allocation could be reused, refactor it for later reusing. Signed-off-by: Wang Huaqiang --- src/util/virresctrl.c | 26 +- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/src/util/virresctrl.c b/src/util/virresctrl.c index

[libvirt] [PATCHv5 13/19] conf: Add resctrl monitor configuration

2018-10-09 Thread Wang Huaqiang
ill have such kind of XML layout: For other type monitor, the XML layout will be something like: Signed-off-by: Wang Huaqiang --- docs/formatdomain.html.in | 26 +++ docs/schemas/domaincommon.rng

[libvirt] [PATCHv5 06/19] util: Add monitor interface to determine path

2018-10-09 Thread Wang Huaqiang
Add interface for resctrl monitor to determine the path. Signed-off-by: Wang Huaqiang --- src/libvirt_private.syms | 1 + src/util/virresctrl.c| 32 src/util/virresctrl.h| 3 +++ 3 files changed, 36 insertions(+) diff --git a/src/libvirt_private.syms

[libvirt] [PATCHv5 02/19] util: Introduce resctrl monitor for CMT

2018-10-09 Thread Wang Huaqiang
Cache Monitoring Technology (aka CMT) provides the capability to report cache utilization information of system task. This patch introduces the concept of resctrl monitor through data structure virResctrlMonitor. Signed-off-by: Wang Huaqiang --- src/libvirt_private.syms | 1 + src/util

[libvirt] [PATCHv5 08/19] util: Add interface for creating monitor group

2018-10-09 Thread Wang Huaqiang
Add interface for creating the resource monitoring group according to '@virResctrlMonitor->path'. Signed-off-by: Wang Huaqiang --- src/libvirt_private.syms | 1 + src/util/virresctrl.c| 28 src/util/virresctrl.h| 6 ++ 3 files changed,

[libvirt] [PATCHv5 12/19] conf: Refactor virDomainResctrlAppend

2018-10-09 Thread Wang Huaqiang
Refactor virDomainResctrlAppend to facilitate virDomainResctrlDef with the capability to hold more element. Signed-off-by: Wang Huaqiang --- src/conf/domain_conf.c | 64 +++--- 1 file changed, 45 insertions(+), 19 deletions(-) diff --git a/src/conf

[libvirt] [PATCHv5 17/19] qemu: refactor qemuDomainGetStatsCpu

2018-10-09 Thread Wang Huaqiang
Refactoring qemuDomainGetStatsCpu, make it possible to add more CPU statistics. Signed-off-by: Wang Huaqiang --- src/qemu/qemu_driver.c | 45 ++--- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu

[libvirt] [PATCHv5 18/19] qemu: Report cache occupancy (CMT) with domstats

2018-10-09 Thread Wang Huaqiang
cpu.cache.1.vcpus=4,5,6 cpu.cache.1.bank.count=2 cpu.cache.1.bank.0.id=0 cpu.cache.1.bank.0.bytes=17571840 cpu.cache.1.bank.1.id=1 cpu.cache.1.bank.1.bytes=29106176 Signed-off-by: Wang Huaqiang --- src/libvirt-domain.c | 9 ++ src/qemu

[libvirt] [PATCHv5 16/19] conf: Add a 'id' to virDomainResctrlDef

2018-10-09 Thread Wang Huaqiang
Adding element 'id' to virDomainResctrlDef. This 'id' reflects the attribute 'id' of of element 'cachetune in XML. virResctrlAlloc.id is a copy of virDomanResctrlDef.id. Signed-off-by: Wang Huaqiang --- src/conf/domain_conf.c | 20 src

[libvirt] [PATCHv5 09/19] util: Add more interfaces for resctrl monitor

2018-10-09 Thread Wang Huaqiang
Add interfaces monitor group to support operations such as add PID, set ID, remove group ... etc. The interface for getting cache occupancy information from the monitor is also added. Signed-off-by: Wang Huaqiang --- src/libvirt_private.syms | 6 ++ src/util/virresctrl.c| 209

[libvirt] [PATCHv5 15/19] qemu: enable resctrl monitor in qemu

2018-10-09 Thread Wang Huaqiang
Add functions for creating, destroying, reconnecting resctrl monitor in qemu according to the configuration in domain XML. Signed-off-by: Wang Huaqiang --- src/qemu/qemu_process.c | 49 ++--- 1 file changed, 46 insertions(+), 3 deletions(-) diff

[libvirt] [PATCHv5 14/19] Util: Add function for checking if monitor is running

2018-10-09 Thread Wang Huaqiang
Check monitor status by checking the PIDs are in file 'task' or not. Signed-off-by: Wang Huaqiang --- src/libvirt_private.syms | 1 + src/util/virresctrl.c| 84 +++- src/util/virresctrl.h| 4 +++ 3 files changed, 88 insertions(+),

[libvirt] [PATCHv5 10/19] util: Introduce default monitor

2018-10-09 Thread Wang Huaqiang
the concept of default monitor, which represents the particular monitoring group that created along with the creation of allocation group. Default monitor shares the common 'vcpu' list with the allocation. Signed-off-by: Wang Huaqiang --- src/libvirt_private.syms | 1 + src/util/vi

[libvirt] [PATCHv5 07/19] util: Refactor code for creating resctrl group

2018-10-09 Thread Wang Huaqiang
The code for creating resctrl allocation group could be reused for monitoring group, refactor it for reusing in the later patch. Signed-off-by: Wang Huaqiang --- src/util/virresctrl.c | 37 +++-- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/src

[libvirt] [PATCHv5 19/19] qemu: Setting up vcpu and adding pids to resctrl monitor groups during reconnection

2018-10-09 Thread Wang Huaqiang
Invoking qemuProcessSetupVcpus in process of VM reconnection. Signed-off-by: Wang Huaqiang --- src/qemu/qemu_process.c | 3 +++ src/util/virresctrl.c | 7 +++ 2 files changed, 10 insertions(+) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index a4bbef6..f85aef0 100644

Re: [libvirt] [PATCHv5 03/19] util: Refactor code for adding PID to the resource group

2018-10-10 Thread Wang, Huaqiang
> -Original Message- > From: John Ferlan [mailto:jfer...@redhat.com] > Sent: Wednesday, October 10, 2018 7:09 AM > To: Wang, Huaqiang ; libvir-list@redhat.com > Cc: Feng, Shaohe ; Niu, Bing ; > Ding, Jian-feng ; Zang, Rui > Subject: Re: [libvirt] [PATCHv5 03/19] ut

Re: [libvirt] [PATCHv5 04/19] util: Add interface for adding PID to monitor

2018-10-10 Thread Wang, Huaqiang
> -Original Message- > From: John Ferlan [mailto:jfer...@redhat.com] > Sent: Wednesday, October 10, 2018 7:09 AM > To: Wang, Huaqiang ; libvir-list@redhat.com > Cc: Feng, Shaohe ; Niu, Bing ; > Ding, Jian-feng ; Zang, Rui > Subject: Re: [libvirt] [PATCHv5 04/19] ut

Re: [libvirt] [PATCHv5 01/19] docs: Refactor schemas to support default allocation

2018-10-10 Thread Wang, Huaqiang
> -Original Message- > From: John Ferlan [mailto:jfer...@redhat.com] > Sent: Wednesday, October 10, 2018 4:36 AM > To: Wang, Huaqiang ; libvir-list@redhat.com > Cc: Feng, Shaohe ; Niu, Bing ; > Ding, Jian-feng ; Zang, Rui > Subject: Re: [libvirt] [PATCHv5 01/19] d

Re: [libvirt] [PATCHv5 00/19] Introduce x86 Cache Monitoring Technology (CMT)

2018-10-10 Thread Wang, Huaqiang
> -Original Message- > From: John Ferlan [mailto:jfer...@redhat.com] > Sent: Wednesday, October 10, 2018 12:54 AM > To: Wang, Huaqiang ; libvir-list@redhat.com > Cc: Feng, Shaohe ; Niu, Bing ; > Ding, Jian-feng ; Zang, Rui > Subject: Re: [libvirt] [PATCHv5 00/19

Re: [libvirt] [PATCHv5 04/19] util: Add interface for adding PID to monitor

2018-10-10 Thread Wang, Huaqiang
> -Original Message- > From: John Ferlan [mailto:jfer...@redhat.com] > Sent: Wednesday, October 10, 2018 7:09 AM > To: Wang, Huaqiang ; libvir-list@redhat.com > Cc: Feng, Shaohe ; Niu, Bing ; > Ding, Jian-feng ; Zang, Rui > Subject: Re: [libvirt] [PATCHv5 05/19] ut

[libvirt] Recall: [PATCHv5 04/19] util: Add interface for adding PID to monitor

2018-10-10 Thread Wang, Huaqiang
Wang, Huaqiang would like to recall the message, "[libvirt] [PATCHv5 04/19] util: Add interface for adding PID to monitor". -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCHv5 04/19] util: Add interface for adding PID to monitor

2018-10-10 Thread Wang, Huaqiang
Hi John, Last reply is for " [PATCHv5 05/19] util: Refactor code for determining allocation path". Please ignore this. Sorry for inconvenience. BR Huaqiang > -Original Message- > From: Wang, Huaqiang > Sent: Wednesday, October 10, 2018 9:48 PM > To: '

Re: [libvirt] [PATCHv5 05/19] util: Refactor code for determining allocation path

2018-10-10 Thread Wang, Huaqiang
> -Original Message- > From: John Ferlan [mailto:jfer...@redhat.com] > Sent: Wednesday, October 10, 2018 7:09 AM > To: Wang, Huaqiang ; libvir-list@redhat.com > Cc: Feng, Shaohe ; Niu, Bing ; > Ding, Jian-feng ; Zang, Rui > Subject: Re: [libvirt] [PATCHv5 05/19] ut

Re: [libvirt] [PATCHv5 06/19] util: Add monitor interface to determine path

2018-10-10 Thread Wang, Huaqiang
> -Original Message- > From: John Ferlan [mailto:jfer...@redhat.com] > Sent: Wednesday, October 10, 2018 7:16 AM > To: Wang, Huaqiang ; libvir-list@redhat.com > Cc: Feng, Shaohe ; Niu, Bing ; > Ding, Jian-feng ; Zang, Rui > Subject: Re: [libvirt] [PATCHv5 06/

Re: [libvirt] [PATCHv5 02/19] util: Introduce resctrl monitor for CMT

2018-10-10 Thread Wang, Huaqiang
> -Original Message- > From: John Ferlan [mailto:jfer...@redhat.com] > Sent: Wednesday, October 10, 2018 7:08 AM > To: Wang, Huaqiang ; libvir-list@redhat.com > Cc: Feng, Shaohe ; Niu, Bing ; > Ding, Jian-feng ; Zang, Rui > Subject: Re: [libvirt] [PATCHv5 02/19] ut

Re: [libvirt] [PATCHv5 08/19] util: Add interface for creating monitor group

2018-10-11 Thread Wang, Huaqiang
On 10/11/2018 3:13 AM, John Ferlan wrote: > > On 10/9/18 6:30 AM, Wang Huaqiang wrote: >> Add interface for creating the resource monitoring group according >> to '@virResctrlMonitor->path'. >> >> Signed-off-by: Wang Huaqiang >> --- >> sr

Re: [libvirt] [PATCHv5 09/19] util: Add more interfaces for resctrl monitor

2018-10-11 Thread Wang, Huaqiang
On 10/11/2018 3:13 AM, John Ferlan wrote: > > > On 10/9/18 6:30 AM, Wang Huaqiang wrote: >> Add interfaces monitor group to support operations such >> as add PID, set ID, remove group ... etc. >> >> The interface for getting cache occupancy information

Re: [libvirt] [PATCHv5 10/19] util: Introduce default monitor

2018-10-11 Thread Wang, Huaqiang
On 10/11/2018 3:14 AM, John Ferlan wrote: > > > On 10/9/18 6:30 AM, Wang Huaqiang wrote: >> In resctrl file system, more than one monitoring groups >> could be created within one allocation group, along with >> the creation of allocation group, a monitoring group is &g

Re: [libvirt] [PATCHv5 11/19] conf: Refactor code for matching existing resctrls

2018-10-11 Thread Wang, Huaqiang
On 10/11/2018 3:15 AM, John Ferlan wrote: > > > On 10/9/18 6:30 AM, Wang Huaqiang wrote: >> Refactoring the code of matching the new resctrl with >> existing resctrl groups. Add the virObjectRef action >> into function virDomainResctrlVcpuMatch. >> >> Signe

Re: [libvirt] [PATCHv5 10/19] util: Introduce default monitor

2018-10-11 Thread Wang, Huaqiang
Answers refined. On 10/11/2018 3:14 AM, John Ferlan wrote: > > On 10/9/18 6:30 AM, Wang Huaqiang wrote: >> In resctrl file system, more than one monitoring groups >> could be created within one allocation group, along with >> the creation of allocation group, a monitorin

Re: [libvirt] [PATCHv5 13/19] conf: Add resctrl monitor configuration

2018-10-12 Thread Wang, Huaqiang
> -Original Message- > From: John Ferlan [mailto:jfer...@redhat.com] > Sent: Thursday, October 11, 2018 4:58 AM > To: Wang, Huaqiang ; libvir-list@redhat.com > Cc: Feng, Shaohe ; Niu, Bing ; > Ding, Jian-feng ; Zang, Rui > Subject: Re: [libvirt] [PATCHv5 13/19] conf

Re: [libvirt] [PATCHv5 12/19] conf: Refactor virDomainResctrlAppend

2018-10-12 Thread Wang, Huaqiang
> -Original Message- > From: John Ferlan [mailto:jfer...@redhat.com] > Sent: Thursday, October 11, 2018 3:54 AM > To: Wang, Huaqiang ; libvir-list@redhat.com > Cc: Feng, Shaohe ; Niu, Bing ; > Ding, Jian-feng ; Zang, Rui > Subject: Re: [libvirt] [PATCHv5

Re: [libvirt] [PATCHv5 14/19] Util: Add function for checking if monitor is running

2018-10-12 Thread Wang, Huaqiang
> -Original Message- > From: John Ferlan [mailto:jfer...@redhat.com] > Sent: Thursday, October 11, 2018 4:58 AM > To: Wang, Huaqiang ; libvir-list@redhat.com > Cc: Feng, Shaohe ; Niu, Bing ; > Ding, Jian-feng ; Zang, Rui > Subject: Re: [libvirt] [PATCHv5 14/19] U

Re: [libvirt] [PATCHv5 15/19] qemu: enable resctrl monitor in qemu

2018-10-12 Thread Wang, Huaqiang
> -Original Message- > From: John Ferlan [mailto:jfer...@redhat.com] > Sent: Thursday, October 11, 2018 4:59 AM > To: Wang, Huaqiang ; libvir-list@redhat.com > Cc: Feng, Shaohe ; Niu, Bing ; > Ding, Jian-feng ; Zang, Rui > Subject: Re: [libvirt] [PATCHv5 15/19]

[libvirt] [PATCH] conf: Fix bug in finding alloc through matching vcpus

2018-10-12 Thread Wang Huaqiang
The @alloc object returned by virDomainResctrlVcpuMatch is not properly referenced and un-referenced in virDomainCachetuneDefParse. This patch fixes this problem. Signed-off-by: Wang Huaqiang --- src/conf/domain_conf.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src

Re: [libvirt] [PATCHv5 11/19] conf: Refactor code for matching existing resctrls

2018-10-12 Thread Wang, Huaqiang
> -Original Message- > From: John Ferlan [mailto:jfer...@redhat.com] > Sent: Thursday, October 11, 2018 5:58 AM > To: Wang, Huaqiang ; libvir-list@redhat.com > Cc: Feng, Shaohe ; Niu, Bing ; > Ding, Jian-feng ; Zang, Rui > Subject: Re: [libvirt] [PATCHv5 11/19] co

Re: [libvirt] [PATCHv5 05/19] util: Refactor code for determining allocation path

2018-10-12 Thread Wang, Huaqiang
> -Original Message- > From: John Ferlan [mailto:jfer...@redhat.com] > Sent: Thursday, October 11, 2018 5:41 AM > To: Wang, Huaqiang ; libvir-list@redhat.com > Cc: Feng, Shaohe ; Niu, Bing ; > Ding, Jian-feng ; Zang, Rui > Subject: Re: [libvirt] [PATCHv5 05/19] ut

  1   2   3   >