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

2018-11-12 Thread Wang, Huaqiang
> -Original Message- > From: John Ferlan [mailto:jfer...@redhat.com] > Sent: Tuesday, November 6, 2018 10:41 PM > To: Wang, Huaqiang ; libvir-list@redhat.com > Cc: Feng, Shaohe ; bing@intel.com; Ding, Jian- > feng ; Zang, Rui > Subject: Re: [PATCHv7 05/18

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

2018-11-12 Thread Wang, Huaqiang
> -Original Message- > From: John Ferlan [mailto:jfer...@redhat.com] > Sent: Wednesday, November 7, 2018 12:15 AM > To: Wang, Huaqiang ; libvir-list@redhat.com > Cc: Feng, Shaohe ; bing@intel.com; Ding, Jian- > feng ; Zang, Rui > Subject: Re: [PATCHv

Re: [libvirt] [PATCHv7 00/18] Introduce x86 Cache Monitoring Technology (CMT)

2018-11-12 Thread Wang, Huaqiang
On 11/6/2018 4:19 AM, John Ferlan wrote: On 10/22/18 4:01 AM, Wang Huaqiang wrote: This series of patches and the series already been merged introduce the x86 Cache Monitoring Technology (CMT) to libvirt by interacting with kernel resource control (resctrl) interface. CMT is one of the Intel

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

2018-11-12 Thread Wang, Huaqiang
On 11/6/2018 3:27 AM, John Ferlan wrote: On 10/22/18 4:01 AM, Wang Huaqiang wrote: 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

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

2018-11-12 Thread Wang, Huaqiang
-Original Message- From: John Ferlan [mailto:jfer...@redhat.com] Sent: Tuesday, November 6, 2018 4:09 AM To: Wang, Huaqiang ; libvir-list@redhat.com Cc: Feng, Shaohe ; Niu, Bing ; Ding, Jian-feng ; Zang, Rui Subject: Re: [PATCHv7 18/18] qemu: Setting up vcpu and adding pids

[libvirt] [PATCHv8 02/17] util: Introduce resctrl monitor for CMT

2018-11-12 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] [PATCHv8 14/17] qemu: enable resctrl monitor in qemu

2018-11-12 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, 48 insertions(+), 1 deletion(-) diff --git

[libvirt] [PATCHv8 12/17] conf: Remove virDomainResctrlAppend and introduce virDomainResctrlNew

2018-11-12 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 | 56 +- 1 file changed, 33 insertions(+), 23 deletions(-) diff --git a/src/conf/domain_conf.c b/

[libvirt] [PATCHv8 16/17] qemu: Report cache occupancy (CMT) with domstats

2018-11-12 Thread Wang Huaqiang
.bytes=29106176 Signed-off-by: Wang Huaqiang --- src/libvirt-domain.c | 9 +++ src/qemu/qemu_driver.c | 198 + 2 files changed, 207 insertions(+) diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index 7690339..4895f9f 100644 --- a/src

[libvirt] [PATCHv8 15/17] qemu: Refactor qemuDomainGetStatsCpu

2018-11-12 Thread Wang Huaqiang
Refactoring qemuDomainGetStatsCpu, make it possible to add more CPU statistics. Signed-off-by: Wang Huaqiang --- src/qemu/qemu_driver.c | 21 - 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 09e04b8

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

2018-11-12 Thread Wang, Huaqiang
On 11/6/2018 2:44 AM, John Ferlan wrote: On 10/22/18 4:01 AM, Wang Huaqiang wrote: 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

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

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

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

2018-11-12 Thread Wang, Huaqiang
On 11/6/2018 4:04 AM, John Ferlan wrote: On 10/22/18 4:01 AM, Wang Huaqiang wrote: Adding the interface in qemu to report CMT statistic information through command 'virsh domstats --cpu-total'. Below is a typical output: # virsh domstats 1 --cpu-total Domain

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

2018-11-12 Thread Wang, Huaqiang
Huaqiang wrote: 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

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

2018-11-12 Thread Wang, Huaqiang
On 11/6/2018 2:01 AM, John Ferlan wrote: On 10/22/18 4:01 AM, Wang Huaqiang wrote: 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

[libvirt] [PATCHv8 11/17] util: Add more interfaces for resctrl monitor

2018-11-12 Thread Wang Huaqiang
Add interfaces monitor group to support operations such as add PID, get ID, remove group ... etc. Signed-off-by: Wang Huaqiang --- src/libvirt_private.syms | 5 ++ src/util/virresctrl.c| 167 +++ src/util/virresctrl.h| 26 3 files

[libvirt] [PATCHv8 13/17] conf: Introduce cache monitor element in cachetune

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

[libvirt] [PATCHv8 10/17] util: Add interface for setting monitor ID.

2018-11-12 Thread Wang Huaqiang
Add virResctrlMonitorSetID by leveraging previous refactored patch. Signed-off-by: Wang Huaqiang --- src/util/virresctrl.c | 9 + 1 file changed, 9 insertions(+) diff --git a/src/util/virresctrl.c b/src/util/virresctrl.c index 4e4831c..ed682c9 100644 --- a/src/util/virresctrl.c +++ b

[libvirt] [PATCHv8 04/17] util: Add interface to determine monitor path

2018-11-12 Thread Wang Huaqiang
Add interface for resctrl monitor to determine the path. Signed-off-by: Wang Huaqiang Reviewed-by: John Ferlan --- src/libvirt_private.syms | 1 + src/util/virresctrl.c| 55 src/util/virresctrl.h| 5 - 3 files changed, 60

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

2018-11-12 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] [PATCHv8 07/17] util: Refactor code for creating resctrl group

2018-11-12 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 Reviewed-by: John Ferlan --- src/util/virresctrl.c | 37 +++-- 1 file changed, 23 insertions(+), 14

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

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

[libvirt] [PATCHv8 06/17] util: Add interface for adding PID to the monitor

2018-11-12 Thread Wang Huaqiang
Add interface for adding task PID to the monitor. Signed-off-by: Wang Huaqiang Reviewed-by: John Ferlan --- 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] [PATCHv8 09/17] util: Refactor virResctrlAllocSetID to set allocation ID

2018-11-12 Thread Wang Huaqiang
Refactor virResctrlAllocSetID. In new code the error of id overwriting is reported promptly. Signed-off-by: Wang Huaqiang --- src/util/virresctrl.c | 25 - 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/src/util/virresctrl.c b/src/util/virresctrl.c index

[libvirt] [PATCHv8 00/17] Introduce x86 Cache Monitoring Technology (CMT)

2018-11-12 Thread Wang Huaqiang
CMT, fake new feature. - Creating CMT resource control group will be subsequent job. Wang Huaqiang (17): docs,util: Refactor schemas and virresctrl to support optional cache util: Introduce resctrl monitor for CMT util: Refactor code for determining allocation path util: Add interf

[libvirt] [PATCHv8 17/17] docs: Updated news.xml about the CMT support

2018-11-12 Thread Wang Huaqiang
Signed-off-by: Wang Huaqiang --- docs/news.xml | 11 +++ 1 file changed, 11 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index 88774c5..3c84126 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -50,6 +50,17 @@ pvops-based HVM domains

[libvirt] [PATCHv8 03/17] util: Refactor code for determining allocation path

2018-11-12 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] [PATCHv8 08/17] util: Add interface for creating monitor group

2018-11-12 Thread Wang Huaqiang
Add interface for creating the resource monitoring group according to '@virResctrlMonitor->path'. Signed-off-by: Wang Huaqiang Reviewed-by: John Ferlan --- src/libvirt_private.syms | 1 + src/util/virresctrl.c| 24 src/util/virresctrl.h| 4 3 fi

[libvirt] [PATCHv8 2/2] tools: Add help docs explaining 'domstats' cache monitor result

2018-11-13 Thread Wang Huaqiang
Add help document in explaining the cache monitor related 'domstats' result. This patch is written to address John's review comment regarding patch16-v7 and expected to be merged with previous patch and using that patch's committing message. Signed-off-by: Wang Huaqiang --- src/libvirt

Re: [libvirt] [PATCHv8 16/17] qemu: Report cache occupancy (CMT) with domstats

2018-11-13 Thread Wang, Huaqiang
> -Original Message- > From: John Ferlan [mailto:jfer...@redhat.com] > Sent: Wednesday, November 14, 2018 7:57 AM > To: Wang, Huaqiang ; libvir-list@redhat.com > Cc: Feng, Shaohe ; Ding, Jian-feng feng.d...@intel.com>; Zang, Rui > Subject: Re: [PATCHv8 16/1

[libvirt] [PATCHv8 1/2] qemu: Report cache occupancy (CMT) with domstats

2018-11-13 Thread Wang Huaqiang
.bytes=29106176 Signed-off-by: Wang Huaqiang --- src/libvirt-domain.c | 9 +++ src/qemu/qemu_driver.c | 198 + 2 files changed, 207 insertions(+) diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index 7690339..4895f9f 100644 --- a/src

Re: [libvirt] [PATCHv8 16/17] qemu: Report cache occupancy (CMT) with domstats

2018-11-15 Thread Wang, Huaqiang
> -Original Message- > From: John Ferlan [mailto:jfer...@redhat.com] > Sent: Thursday, November 15, 2018 12:18 AM > To: Wang, Huaqiang ; libvir-list@redhat.com > Cc: Feng, Shaohe ; Ding, Jian-feng feng.d...@intel.com>; Zang, Rui > Subject: Re: [PATCHv8 16/1

Re: [libvirt] [PATCHv8 17/17] docs: Updated news.xml about the CMT support

2018-11-15 Thread Wang, Huaqiang
> -Original Message- > From: John Ferlan [mailto:jfer...@redhat.com] > Sent: Thursday, November 15, 2018 12:19 AM > To: Wang, Huaqiang ; libvir-list@redhat.com > Cc: Feng, Shaohe ; Ding, Jian-feng feng.d...@intel.com>; Zang, Rui > Subject: Re: [PATCHv8 17/17] d

Re: [libvirt] [PATCHv8 2/2] tools: Add help docs explaining 'domstats' cache monitor result

2018-11-15 Thread Wang, Huaqiang
> -Original Message- > From: John Ferlan [mailto:jfer...@redhat.com] > Sent: Thursday, November 15, 2018 12:19 AM > To: Wang, Huaqiang ; libvir-list@redhat.com > Cc: Feng, Shaohe ; Ding, Jian-feng feng.d...@intel.com>; Zang, Rui > Subject: Re: [PATCHv8 2/2]

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

[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
=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/qemu_driver.c | 230

[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/conf/domain_conf.h | 1 + 2 files

[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(+), 1 deletion

[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/virresctrl.c

[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 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
ave 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 | 10 +

[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 01/19] docs: Refactor schemas to support default allocation

2018-10-09 Thread Wang Huaqiang
for 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| 32

[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
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 to the resource group util: Add interface for adding

[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, 35 inserti

[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 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] [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 Ferlan >

[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
for 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/util

[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
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: Refactor schemas to support default allocation util

[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, 35 inserti

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

2018-09-30 Thread Wang Huaqiang
=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/qemu_driver.c | 231

[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(+), 1 deletion

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

2018-09-30 Thread Wang Huaqiang
ave 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/conf/domain_conf.h | 1 + 2 files

[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/virresctrl.c

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

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: 'John

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

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

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

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 >> --- >> src/libvirt_

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 monito

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

2018-09-20 Thread Wang Huaqiang
resource control group will be subsequent job. Wang Huaqiang (4): util: Introduce monitor capability interface conf: Refactor cache bank capability structure conf: Refactor memory bandwidth capability structure conf: Introduce RDT monitor host capability docs/schemas/capability.rng

[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
, such as 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] [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

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] [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] [PATCH] util: Fix a bug in virResctrlMonitorGetStats

2018-11-19 Thread Wang Huaqiang
The path argument of virFileIsDir should be a full name of file, pathname and filename. Fixed it by passing the full path name to virFileIsDir. Signed-off-by: Wang Huaqiang --- src/util/virresctrl.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/util

[libvirt] [PATCHv9 1/2] qemu: Report cache occupancy (CMT) with domstats

2018-11-20 Thread Wang Huaqiang
.bytes=29106176 Signed-off-by: Wang Huaqiang --- src/libvirt-domain.c | 12 src/qemu/qemu_driver.c | 160 - tools/virsh.pod| 14 + 3 files changed, 185 insertions(+), 1 deletion(-) diff --git a/src/libvirt-domain.c b/src/libvirt

<    1   2   3   >