Re: [libvirt] [PATCH 1/3] util: add Intel x86 RDT/CMT support

2018-06-12 Thread Wang, Huaqiang
See my update inline. > -Original Message- > From: Martin Kletzander [mailto:mklet...@redhat.com] > Sent: Monday, June 11, 2018 4:40 PM > To: Wang, Huaqiang > Cc: libvir-list@redhat.com; Feng, Shaohe ; Niu, Bing > ; Ding, Jian-feng ; Zang, Rui > > Subject:

Re: [libvirt] [PATCH 2/3] tools: virsh: add command for controling/monitoring resctrl

2018-06-12 Thread Wang, Huaqiang
> -Original Message- > From: Martin Kletzander [mailto:mklet...@redhat.com] > Sent: Monday, June 11, 2018 4:45 PM > To: Wang, Huaqiang > Cc: libvir-list@redhat.com; Feng, Shaohe ; Niu, Bing > ; Ding, Jian-feng ; Zang, Rui > > Subject: Re: [libvirt] [PATC

Re: [libvirt] [RFC PATCH 0/3] RFC for X86 RDT Cache Monitoring Technology (CMT) support

2018-06-12 Thread Wang, Huaqiang
Hi Martin, Thanks for your comments, please see my update inline below. > -Original Message- > From: Martin Kletzander [mailto:mklet...@redhat.com] > Sent: Monday, June 11, 2018 4:30 PM > To: Wang, Huaqiang > Cc: libvir-list@redhat.com; Feng, Shaohe ; Niu, Bing >

[libvirt] [PATCH 1/3] util: add Intel x86 RDT/CMT support

2018-06-08 Thread Wang Huaqiang
Add RDT/CMT feature (Intel x86) by interacting with kernel resctrl file system. Integrate code into util/resctrl. --- src/libvirt_private.syms | 9 ++ src/util/virresctrl.c| 316 ++- src/util/virresctrl.h| 44 +++ 3 files changed, 367

[libvirt] [PATCH 3/3] tools: virsh domstats: show RDT CMT resource utilization information

2018-06-08 Thread Wang Huaqiang
--- include/libvirt/libvirt-domain.h | 1 + src/libvirt-domain.c | 11 + src/qemu/qemu_driver.c | 48 tools/virsh-domain-monitor.c | 7 ++ 4 files changed, 67 insertions(+) diff --git

[libvirt] [RFC PATCH 0/3] RFC for X86 RDT Cache Monitoring Technology (CMT) support

2018-06-08 Thread Wang Huaqiang
-c200 libvirt]# virsh domstats --resctrl Domain: 'vm1' resctrl.cmt=0 Domain: 'vm3' resctrl.cmt=180224 Domain: 'vm2' resctrl.cmt=2613248 ``` Wang Huaqiang (3): util: add Intel x86 RDT/CMT support tools: virsh: add command for controling/monitoring resctrl tools

[libvirt] [PATCH 2/3] tools: virsh: add command for controling/monitoring resctrl

2018-06-08 Thread Wang Huaqiang
--- include/libvirt/libvirt-domain.h| 9 +++ src/conf/domain_conf.c | 28 +++ src/conf/domain_conf.h | 3 + src/driver-hypervisor.h | 8 ++ src/libvirt-domain.c| 81 + src/libvirt_public.syms |

Re: [libvirt] [RFC PATCH 0/3] RFC for X86 RDT Cache Monitoring Technology (CMT) support

2018-06-25 Thread Wang, Huaqiang
Please see my inline reply. > -Original Message- > From: Martin Kletzander [mailto:mklet...@redhat.com] > Sent: Thursday, June 14, 2018 3:54 PM > To: Wang, Huaqiang > Cc: libvir-list@redhat.com; Feng, Shaohe ; Niu, Bing > ; Ding, Jian-feng ; Zang, Rui > > Sub

Re: [libvirt] [PATCH 6/9] conf: Rename cachetune to restune

2018-07-26 Thread Wang, Huaqiang
> -Original Message- > From: John Ferlan [mailto:jfer...@redhat.com] > Sent: Friday, July 27, 2018 12:33 AM > To: Niu, Bing ; libvir-list@redhat.com > Cc: Feng, Shaohe ; Wang, Huaqiang > ; Ding, Jian-feng ; > rui.z...@yandex.com > Subject: Re: [libvirt]

Re: [libvirt] [PATCH 6/9] conf: Rename cachetune to restune

2018-07-26 Thread Wang, Huaqiang
> -Original Message- > From: John Ferlan [mailto:jfer...@redhat.com] > Sent: Friday, July 27, 2018 12:33 AM > To: Niu, Bing ; libvir-list@redhat.com > Cc: Feng, Shaohe ; Wang, Huaqiang > ; Ding, Jian-feng ; > rui.z...@yandex.com > Subject: Re: [libvirt]

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

2018-08-27 Thread Wang Huaqiang
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/libvirt-domain.c | 9

[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 --- .gnulib | 1 - src/conf

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

2018-08-27 Thread Wang Huaqiang
+289,12 @@ struct _virResctrlAlloc { virResctrlAllocMemBWPtr mem_bw; + virResctrlAllocMonPtr *monitors; + size_t nmonitors; } Signed-off-by: Wang Huaqiang --- src/libvirt_private.syms | 6 + src/util/virresctrl.c| 361

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

2018-08-27 Thread Wang Huaqiang
-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 100644 --- a/docs/schemas

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

2018-08-27 Thread Wang Huaqiang
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
=29106176 Wang Huaqiang (10): conf: Renamed 'controlBuf' to 'childrenBuf' util: add interface retrieving CMT capability conf: Add CMT capability to host test: add test case for resctrl monitor util: resctrl: refactoring some functions util: Introduce resctrl monitor for CMT conf: refactor

[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

Re: [libvirt] [RFC PATCHv2 00/10] x86 RDT Cache Monitoring Technology (CMT)

2018-07-17 Thread Wang, Huaqiang
> -Original Message- > From: Martin Kletzander [mailto:mklet...@redhat.com] > Sent: Tuesday, July 17, 2018 5:11 PM > To: Wang, Huaqiang > Cc: libvir-list@redhat.com; Feng, Shaohe ; Niu, Bing > ; Ding, Jian-feng ; Zang, Rui > > Subject: Re: [libvirt] [RFC PATC

Re: [libvirt] [RFC PATCHv2 00/10] x86 RDT Cache Monitoring Technology (CMT)

2018-07-17 Thread Wang, Huaqiang
Hi Martin, Thanks for your comments. Please see my reply inline. > -Original Message- > From: Martin Kletzander [mailto:mklet...@redhat.com] > Sent: Tuesday, July 17, 2018 2:27 PM > To: Wang, Huaqiang > Cc: libvir-list@redhat.com; Feng, Shaohe ; Niu, > Bing ; Ding, J

Re: [libvirt] [RFC PATCHv2 00/10] x86 RDT Cache Monitoring Technology (CMT)

2018-07-18 Thread Wang, Huaqiang
> -Original Message- > From: Martin Kletzander [mailto:mklet...@redhat.com] > Sent: Wednesday, July 18, 2018 10:03 PM > To: Wang, Huaqiang > Cc: libvir-list@redhat.com; Feng, Shaohe ; Niu, Bing > ; Ding, Jian-feng ; Zang, Rui > > Subject: Re: [libvirt] [RF

Re: [libvirt] [RFC PATCHv2 00/10] x86 RDT Cache Monitoring Technology (CMT)

2018-07-18 Thread Wang, Huaqiang
> -Original Message- > From: Martin Kletzander [mailto:mklet...@redhat.com] > Sent: Wednesday, July 18, 2018 8:07 PM > To: Wang, Huaqiang > Cc: libvir-list@redhat.com; Feng, Shaohe ; Niu, Bing > ; Ding, Jian-feng ; Zang, Rui > > Subject: Re: [libvirt] [RFC PATC

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 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

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 01/10] conf: Renamed 'controlBuf' to 'childrenBuf'

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

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 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 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 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

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

[libvirt] [PATCHv2 07/10] qemu: add interfaces for dynamically manupulating resctl mon groups

2018-07-09 Thread Wang Huaqiang
Add interfaces for resource monitoring group - query monitoring group status - dynamically create monitoring group - dynamically destory monitoring group --- src/qemu/qemu_driver.c | 252 + 1 file changed, 252 insertions(+) diff --git

[libvirt] [PATCHv2 01/10] util: add Intel x86 RDT/CMT support

2018-07-09 Thread Wang Huaqiang
Add RDT/CMT feature (Intel x86) by interacting with kernel resctrl file system. Integrate code into util/resctrl. --- src/libvirt_private.syms | 10 ++ src/util/virresctrl.c| 338 +++ src/util/virresctrl.h| 40 ++ 3 files changed, 388

[libvirt] [PATCHv2 03/10] tests: add tests for validating

2018-07-09 Thread Wang Huaqiang
--- tests/genericxml2xmlindata/cachetune-cdp.xml | 3 ++ tests/genericxml2xmlindata/cachetune-small.xml | 2 ++ tests/genericxml2xmlindata/cachetune.xml | 2 ++ .../resmongroup-colliding-cachetune.xml| 34 ++ tests/genericxml2xmltest.c

[libvirt] [PATCHv2 06/10] remote: add remote protocol for resctrl monitoring

2018-07-09 Thread Wang Huaqiang
Function includes setting and getting the status of resource monitoring group. --- src/remote/remote_daemon_dispatch.c | 45 + src/remote/remote_driver.c | 4 +++- src/remote/remote_protocol.x| 31 -

[libvirt] [PATCHv2 05/10] qemu: enable resctrl monitoring at booting stage

2018-07-09 Thread Wang Huaqiang
fetching resctrl monitoring group settings from def->resmons and createing resctrl group accodring to cachetune element status. This patch relies on the function of resctrl of util. --- src/qemu/qemu_process.c | 45 + 1 file changed, 41 insertions(+), 4

[libvirt] [PATCHv2 08/10] tool: add command cpuresource to interact with cpu resources

2018-07-09 Thread Wang Huaqiang
A tool to create, destroy and query resource monitoring group lively. --- tools/virsh-domain.c | 139 +++ 1 file changed, 139 insertions(+) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index e9b88f0..6aa674e 100644 ---

[libvirt] [RFC PATCHv2 00/10] x86 RDT Cache Monitoring Technology (CMT)

2018-07-09 Thread Wang Huaqiang
up instead of whole domain. * be possible to destroy vcpu group at run time * XML configuration file changed * change naming for describing 'RDT CMT' to 'cpu-resource' Wang Huaqiang (10): util: add Intel x86 RDT/CMT support conf: introduce element tests: add tests for validating libvirt:

[libvirt] [PATCHv2 04/10] libvirt: add public APIs for resource monitoring group

2018-07-09 Thread Wang Huaqiang
support functions to create, destory and monitoring resctl monioring group. --- include/libvirt/libvirt-domain.h | 13 ++ src/conf/domain_conf.c | 2 + src/driver-hypervisor.h | 13 ++ src/libvirt-domain.c | 96

[libvirt] [PATCHv2 09/10] tools: show cpu cache occupancy information in domstats

2018-07-09 Thread Wang Huaqiang
add cache occupancy information in command virsh domstats for domains has resource monitoring groups. --- include/libvirt/libvirt-domain.h | 1 + src/qemu/qemu_driver.c | 105 +++ tools/virsh-domain-monitor.c | 7 +++ 3 files changed, 113

[libvirt] [PATCHv2 10/10] news: add Intel x86 RDT CMT feature

2018-07-09 Thread Wang Huaqiang
--- docs/news.xml | 10 ++ 1 file changed, 10 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index 773c95b..d406e51 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -44,6 +44,16 @@ support should be available to the guest. + + +

[libvirt] [PATCHv2 02/10] conf: introduce element

2018-07-09 Thread Wang Huaqiang
resmongroup element is used for feature of resctrl monitoring group, and keeps the information for how resctrl monitoring groups is arranged. --- docs/formatdomain.html.in | 17 +++ docs/schemas/domaincommon.rng | 14 ++ src/conf/domain_conf.c| 318

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]

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

2018-10-15 Thread Wang, Huaqiang
On 10/12/2018 10:27 PM, John Ferlan wrote: [...] 402 virResctrlMonitorDispose(void *obj) 403 { 404 virResctrlMonitorPtr monitor = obj; 405 406 virObjectUnref(monitor->alloc); 407 VIR_FREE(monitor->id); 408 VIR_FREE(monitor->path); 409 } The one "thing"

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

2018-10-15 Thread Wang, Huaqiang
On 10/12/2018 10:40 PM, John Ferlan wrote: [...] virResctrlMonitorCreate(virResctrlAllocPtr alloc, virResctrlMonitorPtr monitor, const char *machinename) @@ -2534,3 +2565,177 @@ virResctrlMonitorCreate(virResctrlAllocPtr alloc,

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

2018-10-15 Thread Wang, Huaqiang
On 10/12/2018 11:18 PM, John Ferlan wrote: On 10/11/18 8:02 AM, Wang, Huaqiang wrote: 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

[libvirt] [PATCHv7 15/18] conf: Add 'id' to virDomainResctrlDef

2018-10-22 Thread Wang Huaqiang
Adding element 'id' to virDomainResctrlDef tracking resource group id, it reflects the attribute 'id' of of element in XML. virResctrlAlloc.id is a copy from virDomanResctrlDef.id. Signed-off-by: Wang Huaqiang --- src/conf/domain_conf.c | 20 src/conf/domain_conf.h | 1

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

2018-10-22 Thread Wang Huaqiang
The code for creating resctrl allocation group could be reused for monitoring group, refactor it for reuse 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] [PATCHv7 03/18] util: Refactor code for determining allocation path

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

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

2018-10-22 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 | 2 +- src/util

[libvirt] [PATCHv6 14/18] util: Add function for checking if monitor is running

2018-10-22 Thread Wang Huaqiang
Check whether monitor is running by checking the monitor's PIDs status. Monitor is looked as running normally if the vcpu PID list matches with the content of monitor's 'tasks' file. Signed-off-by: Wang Huaqiang --- src/libvirt_private.syms | 1 + src/util/virresctrl.c| 102

[libvirt] [PATCHv6 04/18] util: Add interface to determine monitor path

2018-10-22 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| 55 src/util/virresctrl.h| 5 - 3 files changed, 60 insertions(+), 1 deletion(-) diff

[libvirt] [PATCHv6 11/18] conf: move virResctrlAllocIsEmpty to a place a litter lower

2018-10-22 Thread Wang Huaqiang
This refactor allows to add some code between virDomainResctrlNew and virResctrlAllocIsEmpty to extend the scope of resctrl. Signed-off-by: Wang Huaqiang --- src/conf/domain_conf.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf

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

2018-10-22 Thread Wang Huaqiang
The code for creating resctrl allocation group could be reused for monitoring group, refactor it for reuse 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] [PATCHv6 16/18] qemu: refactor qemuDomainGetStatsCpu

2018-10-22 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] [PATCHv7 10/18] conf: Remove virDomainResctrlAppend and introduce virDomainResctrlNew

2018-10-22 Thread Wang Huaqiang
pus and virObjectRef for @alloc, thus removing the need to set each to NULL after the call. Signed-off-by: Wang Huaqiang --- src/conf/domain_conf.c | 60 +- 1 file changed, 35 insertions(+), 25 deletions(-) diff --git a/src/conf/domain_conf.c b/

[libvirt] [PATCHv7 11/18] conf: move virResctrlAllocIsEmpty to a place a litter lower

2018-10-22 Thread Wang Huaqiang
This refactor allows to add some code between virDomainResctrlNew and virResctrlAllocIsEmpty to extend the scope of resctrl. Signed-off-by: Wang Huaqiang --- src/conf/domain_conf.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf

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

2018-10-22 Thread Wang Huaqiang
Invoking qemuProcessSetupVcpus in process of VM reconnection. The vcpu pid information need to be refilled to resctrl monitor after a VM reconnection./ Signed-off-by: Wang Huaqiang --- src/qemu/qemu_process.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/qemu/qemu_process.c b/src

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

2018-10-22 Thread Wang Huaqiang
Add interfaces monitor group to support operations such as add PID, set ID, remove group ... etc. Signed-off-by: Wang Huaqiang --- src/libvirt_private.syms | 5 + src/util/virresctrl.c| 47 +++ src/util/virresctrl.h| 14 ++ 3

[libvirt] [PATCHv7 12/18] conf: Introduce cache monitor element in cachetune

2018-10-22 Thread Wang Huaqiang
Introducing element under to represent a cache monitor. Signed-off-by: Wang Huaqiang --- docs/formatdomain.html.in | 26 +++ docs/schemas/domaincommon.rng | 10 + src/conf/domain_conf.c | 234

[libvirt] [PATCHv7 14/18] util: Add function for checking if monitor is running

2018-10-22 Thread Wang Huaqiang
Check whether monitor is running by checking the monitor's PIDs status. Monitor is looked as running normally if the vcpu PID list matches with the content of monitor's 'tasks' file. Signed-off-by: Wang Huaqiang --- src/libvirt_private.syms | 1 + src/util/virresctrl.c| 102

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

2018-10-22 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] [PATCHv7 01/18] docs, util: Refactor schemas and virresctrl to support optional cache

2018-10-22 Thread Wang Huaqiang
/resctrl/schemata'. Signed-off-by: Wang Huaqiang --- docs/formatdomain.html.in | 4 ++-- docs/schemas/domaincommon.rng | 4 ++-- src/util/virresctrl.c | 28 3 files changed, 32 insertions(+), 4 deletions(-) diff --git a/docs/formatdomain.html.in b/docs

[libvirt] [PATCHv7 06/18] util: Add interface for adding PID to the monitor

2018-10-22 Thread Wang Huaqiang
Add interface for adding task PID to the 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] [PATCHv7 00/18] Introduce x86 Cache Monitoring Technology (CMT)

2018-10-22 Thread Wang Huaqiang
' 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,util: Refactor schemas and virresctrl to support optional cache util: Introduce

[libvirt] [PATCHv7 13/18] qemu: enable resctrl monitor in qemu

2018-10-22 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 | 66 - 1 file changed, 65 insertions(+), 1 deletion(-) diff --git

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

2018-10-22 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| 24 src/util/virresctrl.h| 4 3 files changed, 29 insertions(+) d

[libvirt] [PATCHv7 16/18] qemu: refactor qemuDomainGetStatsCpu

2018-10-22 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] [PATCHv7 04/18] util: Add interface to determine monitor path

2018-10-22 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| 55 src/util/virresctrl.h| 5 - 3 files changed, 60 insertions(+), 1 deletion(-) diff

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

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

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

2018-10-22 Thread Wang Huaqiang
.bytes=29106176 Signed-off-by: Wang Huaqiang --- src/libvirt-domain.c | 9 ++ src/libvirt_private.syms | 1 + src/qemu/qemu_driver.c | 229 +++ src/util/virresctrl.c| 130 +++ src/util/virresctrl.h| 12 +++ 5 files

[libvirt] [PATCHv6 12/18] conf: Introduce cache monitor element in cachetune

2018-10-22 Thread Wang Huaqiang
Introducing element under to represent a cache monitor. Signed-off-by: Wang Huaqiang --- docs/formatdomain.html.in | 26 +++ docs/schemas/domaincommon.rng | 10 + src/conf/domain_conf.c | 234

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

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

[libvirt] [PATCHv6 01/18] docs, util: Refactor schemas and virresctrl to support optional cache

2018-10-22 Thread Wang Huaqiang
/resctrl/schemata'. Signed-off-by: Wang Huaqiang --- docs/formatdomain.html.in | 4 ++-- docs/schemas/domaincommon.rng | 4 ++-- src/util/virresctrl.c | 31 --- 3 files changed, 32 insertions(+), 7 deletions(-) diff --git a/docs/formatdomain.html.in b

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

2018-10-22 Thread Wang Huaqiang
Invoking qemuProcessSetupVcpus in process of VM reconnection. The vcpu pid information need to be refilled to resctrl monitor after a VM reconnection./ Signed-off-by: Wang Huaqiang --- src/qemu/qemu_process.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/qemu/qemu_process.c b/src

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

2018-10-22 Thread Wang Huaqiang
.bytes=29106176 Signed-off-by: Wang Huaqiang --- src/libvirt-domain.c | 9 ++ src/libvirt_private.syms | 1 + src/qemu/qemu_driver.c | 229 +++ src/util/virresctrl.c| 130 +++ src/util/virresctrl.h| 12 +++ 5 files

[libvirt] [PATCHv6 15/18] conf: Add 'id' to virDomainResctrlDef

2018-10-22 Thread Wang Huaqiang
Adding element 'id' to virDomainResctrlDef tracking resource group id, it reflects the attribute 'id' of of element in XML. virResctrlAlloc.id is a copy from virDomanResctrlDef.id. Signed-off-by: Wang Huaqiang --- src/conf/domain_conf.c | 20 src/conf/domain_conf.h | 1

[libvirt] [PATCHv6 13/18] qemu: enable resctrl monitor in qemu

2018-10-22 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 | 66 - 1 file changed, 65 insertions(+), 1 deletion(-) diff --git

[libvirt] [PATCHv6 03/18] util: Refactor code for determining allocation path

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

[libvirt] [PATCHv6 10/18] conf: Remove virDomainResctrlAppend and introduce virDomainResctrlNew

2018-10-22 Thread Wang Huaqiang
pus and virObjectRef for @alloc, thus removing the need to set each to NULL after the call. Signed-off-by: Wang Huaqiang --- src/conf/domain_conf.c | 60 +- 1 file changed, 35 insertions(+), 25 deletions(-) diff --git a/src/conf/domain_conf.c b/

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

2018-10-22 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| 24 src/util/virresctrl.h| 4 3 files changed, 29 insertions(+) d

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

2018-10-22 Thread Wang Huaqiang
Add interfaces monitor group to support operations such as add PID, set ID, remove group ... etc. Signed-off-by: Wang Huaqiang --- src/libvirt_private.syms | 5 + src/util/virresctrl.c| 47 +++ src/util/virresctrl.h| 14 ++ 3

[libvirt] [PATCHv6 06/18] util: Add interface for adding PID to the monitor

2018-10-22 Thread Wang Huaqiang
Add interface for adding task PID to the 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] [PATCHv6 00/18] Introduce x86 Cache Monitoring Technology (CMT)

2018-10-22 Thread Wang Huaqiang
virResctrlInfoGetMonitorPrefix - Added more tests, covering standalone CMT, fake new feature. - Creating CMT resource control group will be subsequent job. Wang Huaqiang (18): docs,util: Refactor schemas and virresctrl to support optional cache util: Introduce resctrl monitor for CMT util: Refactor code

[libvirt] [PATCH] util: Fix a typo in comments of virresctrl.c

2018-10-17 Thread Wang Huaqiang
Signed-off-by: Wang Huaqiang --- src/util/virresctrl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/virresctrl.c b/src/util/virresctrl.c index df5b512..5d811a2 100644 --- a/src/util/virresctrl.c +++ b/src/util/virresctrl.c @@ -259,7 +259,7 @@ virResctrlInfoMonFree

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

2018-10-17 Thread Wang, Huaqiang
I think I have forget replying this review. On 10/11/2018 5:28 AM, John Ferlan wrote: On 10/10/18 9:44 AM, Wang, Huaqiang wrote: -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

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

[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

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

2018-10-12 Thread Wang, Huaqiang
> -Original Message- > From: John Ferlan [mailto:jfer...@redhat.com] > Sent: Thursday, October 11, 2018 5:43 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 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/1

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 13/19] conf: Add resctrl monitor configuration

2018-10-15 Thread Wang, Huaqiang
On 10/13/2018 6:29 AM, John Ferlan wrote: On 10/12/18 3:10 AM, Wang, Huaqiang wrote: -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

  1   2   3   >