Re: [libvirt] [PATCHv2 1/2] util, resctrl: using 64bit interface instead of 32bit for counters

2020-01-06 Thread Wang, Huaqiang
Hi Daniel, Thanks for review! Br Huaqiang > -Original Message- > From: Daniel P. Berrangé > Sent: Monday, January 6, 2020 10:16 PM > To: Wang, Huaqiang > Cc: libvir-list@redhat.com > Subject: Re: [PATCHv2 1/2] util, resctrl: using 64bit interface instead of >

Re: [libvirt] [PATCHv2 2/2] Introduce command 'virsh domstats --memory' for reporting memory BW

2020-01-06 Thread Wang, Huaqiang
Hi Daniel, Thanks for your hard work and review! Br Huaqiang > -Original Message- > From: Daniel P. Berrangé > Sent: Monday, January 6, 2020 10:17 PM > To: Wang, Huaqiang > Cc: libvir-list@redhat.com > Subject: Re: [PATCHv2 2/2] Introduce command 'virsh

[libvirt] [PATCHv2 0/2] Introduce the support of Intel RDT-MBM

2020-01-02 Thread Wang Huaqiang
result, and keeping the interface consistent. * Add 'virsh domstats --memory' document in file 'virsh.rst' Wang Huaqiang (2): util, resctrl: using 64bit interface instead of 32bit for counters Introduce command 'virsh domstats --memory' for reporting memory BW docs/manpages/virsh.rst |

[libvirt] [PATCHv2 1/2] util, resctrl: using 64bit interface instead of 32bit for counters

2020-01-02 Thread Wang Huaqiang
reported with a truncated 32bit data type. because, in silicon world, CPU cache size will never exceed 4GB. Signed-off-by: Wang Huaqiang --- src/qemu/qemu_driver.c | 15 +-- src/util/virfile.c | 40 src/util/virfile.h | 2 ++ src/util

[libvirt] [PATCHv2 2/2] Introduce command 'virsh domstats --memory' for reporting memory BW

2020-01-02 Thread Wang Huaqiang
memory.bandwidth.monitor.1.node.1.id=1 memory.bandwidth.monitor.1.node.1.bytes.total=406044672 memory.bandwidth.monitor.1.node.1.bytes.local=229425152 Signed-off-by: Wang Huaqiang --- docs/manpages/virsh.rst | 22 ++- include/libvirt/libvirt-domain.h | 1 + src/libvirt-domain.c | 21

Re: [libvirt] [PATCH 1/5] util, resctrl: using 64bit interface instead of 32bit for counters

2019-12-16 Thread Wang Huaqiang
On 2019/12/16 下午6:12, Daniel P. Berrangé wrote: On Sun, Dec 15, 2019 at 02:39:20AM +, Wang, Huaqiang wrote: Hi Daniel, Thanks for your review. About patch 1/5, I understand we should be very cautious when we changes the determined interface. I'd like to reserved the old 32bit

Re: [libvirt] [PATCH 5/5] virsh: show memoryBW info in 'virsh domstats' command

2019-12-14 Thread Wang, Huaqiang
> -Original Message- > From: Daniel P. Berrangé > Sent: Friday, December 13, 2019 11:56 PM > To: Wang, Huaqiang > Cc: libvir-list@redhat.com > Subject: Re: [libvirt] [PATCH 5/5] virsh: show memoryBW info in 'virsh > domstats' command > > On Thu, Nov 14, 201

Re: [libvirt] [PATCH 1/5] util, resctrl: using 64bit interface instead of 32bit for counters

2019-12-14 Thread Wang, Huaqiang
and accumulatively, this value can easily exceed the 4GB bound, so I don’t want to reserve the old 32 bit interface and let user use it, because it will report incorrect value. > -Original Message- > From: Daniel P. Berrangé > Sent: Friday, December 13, 2019 11:01 PM > To: Wang, Huaqiang

Re: [libvirt] qemu: directly create virResctrlInfo ignoring capabilities

2019-12-09 Thread Wang Huaqiang
This patch introduced a bug and broke the 'resctrl' feature. It introduced a 'divide by zero' error if you defined any 'resctrl' allocation group through . Reason is 'caps->resctrl' is fully initialized through two steps, 'virResctrlInfoNew' invokes 'virResctrlGetInfo' completes the first

Re: [libvirt] [PATCH 0/5] Introduce the support of Intel RDT-MBM

2019-11-14 Thread Wang Huaqiang
. Berrangé <mailto:berra...@redhat.com>> Date:   Wed May 22 14:07:57 2019 +0100     Add new hugetlb memory stats constants     Signed-off-by: Daniel P. Berrangé <mailto:berra...@redhat.com>> On Wed, Nov 13, 2019 at 6:34 PM Wang Huaqiang <mailto:huaqiang.w...@intel.com>> wrote:

[libvirt] [PATCH 2/5] conf: showing cache/memoryBW monitor features in capabilities

2019-11-13 Thread Wang Huaqiang
From: Huaqiang We learned that the hardware features of CAT, CMT, MBA and MBM are orthogonal ones, if CAT or MBA is not supported in system, but CMT or MBM are supported, then the cache monitor or memoryBW monitor features may not be correctly displayed in host capabilities through command

[libvirt] [PATCH 5/5] virsh: show memoryBW info in 'virsh domstats' command

2019-11-13 Thread Wang Huaqiang
From: Huaqiang Introduce an option '--memory' for showing memory related information. The memory bandwidth infomatio is listed as: Domain: 'libvirt-vm' memory.bandwidth.monitor.count=4 memory.bandwidth.monitor.0.name=vcpus_0-4 memory.bandwidth.monitor.0.vcpus=0-4

[libvirt] [PATCH 4/5] conf: Parse dommon configure file for memorytune monitors

2019-11-13 Thread Wang Huaqiang
From: Huaqiang Create memory bandwidth monitor. Following domain configuration changes create two memory bandwidth monitors: one is monitoring the bandwidth consumed by vCPU 0, another is for vCPU 5. ``` +

[libvirt] [PATCH 3/5] cachetune schema: a looser check for the order of and element

2019-11-13 Thread Wang Huaqiang
From: Huaqiang Originally, inside , it requires the element to be in the position before , and following configuration is not permitted by schema, but it is better to let it be valid. ^ |__ Not permitted originally because it is in the place

[libvirt] [PATCH 1/5] util, resctrl: using 64bit interface instead of 32bit for counters

2019-11-13 Thread Wang Huaqiang
From: Huaqiang The underlying resctrl monitoring is actually using 64 bit counters, not the 32bit one. Correct this by using 64bit interfaces. Signed-off-by: Huaqiang --- src/qemu/qemu_driver.c | 4 ++-- src/util/virfile.c | 40 src/util/virfile.h

[libvirt] [PATCH 0/5] Introduce the support of Intel RDT-MBM

2019-11-13 Thread Wang Huaqiang
RDT is the short for Intel Resource Director Technology, consists of four sub-technologies until now: -. CAT for cache allocation -. CMT for cache usage monitoring -. MBA for memory bandwidth allocation -. MBM for memory bandwidth usage monitoring The Linux kernel interface is

[libvirt] [PATCH] conf: resctrl object is not properly handled

2019-08-20 Thread Wang Huaqiang
eed when sharing happens. Signed-off-by: Wang Huaqiang --- src/conf/domain_conf.c| 12 +--- tests/genericxml2xmlindata/memorytune.xml | 4 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 617c

Re: [libvirt] [PATCHv2 00/11] util/resctrl cleanups and refactors

2019-08-20 Thread Wang, Huaqiang
Hi Cole, Good catch, I'll fix and make test soon. Thanks > -Original Message- > From: Cole Robinson [mailto:crobi...@redhat.com] > Sent: Tuesday, August 20, 2019 6:30 AM > To: Michal Privoznik ; Wang, Huaqiang > ; libvir-list@redhat.com > Cc: Su, Tao > Subject: R

Re: [libvirt] [PATCHv2 09/11] util: Extend virresctl API to retrieve multiple monitor statistics

2019-08-06 Thread Wang, Huaqiang
I'll fix it soon. > -Original Message- > From: Marc-André Lureau [mailto:marcandre.lur...@gmail.com] > Sent: Tuesday, August 6, 2019 6:48 PM > To: Wang, Huaqiang ; Michal Privoznik > > Cc: libvir-list@redhat.com; Su, Tao > Subject: Re: [libvirt] [PATCHv2 09/11] u

Re: [libvirt] [PATCHv2 00/11] util/resctrl cleanups and refactors

2019-07-31 Thread Wang, Huaqiang
Hi Michal, Thanks for review, have a good day! Br Huaqiang > -Original Message- > From: Michal Privoznik [mailto:mpriv...@redhat.com] > Sent: Wednesday, July 31, 2019 8:38 PM > To: Wang, Huaqiang ; libvir-list@redhat.com > Cc: Su, Tao > Subject: Re: [libvirt] [P

Re: [libvirt] [PATCHv2 00/11] util/resctrl cleanups and refactors

2019-07-21 Thread Wang, Huaqiang
Ping. I am also prepared the MBM(memory bandwidth monitor) patches based on these cleanups, I wonder if it is proper to submit it along with these patches, if yes, I'd like to send out the whole patches in another thread. Thanks Huaqiang > -Original Message- > From: Wang, Hu

Re: [libvirt] [PATCHv2 00/11] util/resctrl cleanups and refactors

2019-07-01 Thread Wang, Huaqiang
patches as a whole , I can send them out shortly. Br Huaqiang > -Original Message- > From: Wang, Huaqiang > Sent: Tuesday, June 11, 2019 11:31 AM > To: libvir-list@redhat.com > Cc: Wang, Huaqiang ; Su, Tao > > Subject: [PATCHv2 00/11] util/resctrl cleanups and r

[libvirt] [PATCHv2 09/11] util: Extend virresctl API to retrieve multiple monitor statistics

2019-06-10 Thread Wang Huaqiang
Export virResctrlMonitorGetStats and make virResctrlMonitorGetCacheOccupancy obsoleted. Signed-off-by: Wang Huaqiang --- src/libvirt_private.syms | 1 + src/qemu/qemu_driver.c | 33 + src/util/virresctrl.c| 44

[libvirt] [PATCHv2 10/11] util: Remove unused virResctrlMonitorGetCacheOccupancy

2019-06-10 Thread Wang Huaqiang
Signed-off-by: Wang Huaqiang --- src/libvirt_private.syms | 1 - src/util/virresctrl.c| 27 --- src/util/virresctrl.h| 5 - 3 files changed, 33 deletions(-) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 3a4f526..96de17e 100644

[libvirt] [PATCHv2 07/11] util: Refactor and rename 'virResctrlMonitorFreeStats'

2019-06-10 Thread Wang Huaqiang
Refactor and rename 'virResctrlMonitorFreeStats' to 'virResctrlMonitorStatsFree' to free one 'virResctrlMonitorStatsPtr' object. Signed-off-by: Wang Huaqiang --- src/libvirt_private.syms | 2 +- src/qemu/qemu_driver.c | 6 +- src/util/virresctrl.c| 14 -- src/util

[libvirt] [PATCHv2 05/11] conf: refactor 'virDomainResctrlVcpuMatch' and some code cleanup

2019-06-10 Thread Wang Huaqiang
Let 'virDomainResctrlVcpuMatch' to retrieve a pointer of virDomainResctrlDefPtr in its third parameter instead of virResctrlAllocPtr, if @vcpus is matched with the vcpus of some resctrl allocation in list of @def->resctrls. Signed-off-by: Wang Huaqiang --- src/conf/domain_conf.c |

[libvirt] [PATCHv2 04/11] conf: some code cleanup

2019-06-10 Thread Wang Huaqiang
Creating object and judging if it is successfully created in fewer lines. Signed-off-by: Wang Huaqiang --- src/conf/domain_conf.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index db25c1f..e4a6dfb 100644

[libvirt] [PATCHv2 06/11] conf: Append 'resctrl' object according to number of monitor group directly

2019-06-10 Thread Wang Huaqiang
@resctrl object to @def->resctrls. This kind of replacement is also more efficient and avoiding a long function calling path. Signed-off-by: Wang Huaqiang --- src/conf/domain_conf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/conf/domain_conf.c b/src/c

[libvirt] [PATCHv2 08/11] util: Refactor 'virResctrlMonitorStats'

2019-06-10 Thread Wang Huaqiang
Refactor 'virResctrlMonitorStats' to track multiple statistical records. Signed-off-by: Wang Huaqiang --- src/qemu/qemu_driver.c | 2 +- src/util/virresctrl.c | 11 ++- src/util/virresctrl.h | 12 ++-- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/src/qemu

[libvirt] [PATCHv2 00/11] util/resctrl cleanups and refactors

2019-06-10 Thread Wang Huaqiang
. 5. Extend data structure 'virResctrlMonitorStats' with the capability to carry multiple statistical information from monitor. Wang Huaqiang (11): util,conf: Handle default monitor group of an allocation properly conf: code cleanup, remove empty line and one space conf: code cleanup

[libvirt] [PATCHv2 02/11] conf: code cleanup, remove empty line and one space

2019-06-10 Thread Wang Huaqiang
Remove some redundant space and line. Signed-off-by: Wang Huaqiang --- src/conf/domain_conf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index a3a5141..e3c8aa0 100644 --- a/src/conf/domain_conf.c +++ b/src/conf

[libvirt] [PATCHv2 03/11] conf: code cleanup for return error code directly

2019-06-10 Thread Wang Huaqiang
code cleanup for 'virDomainCachetuneDefParse' and 'virDomainMemorytuneDefParse'. Signed-off-by: Wang Huaqiang --- src/conf/domain_conf.c | 46 +- 1 file changed, 21 insertions(+), 25 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf

[libvirt] [PATCHv2 11/11] conf: Refactor and rename the function to validate a new resctrl monitor

2019-06-10 Thread Wang Huaqiang
virDomainResctrlMonValidateVcpus to virDomainResctrlValidateMonitor. Signed-off-by: Wang Huaqiang --- src/conf/domain_conf.c | 62 +++--- 1 file changed, 38 insertions(+), 24 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 676a2ac..2af81c0

[libvirt] [PATCHv2 01/11] util, conf: Handle default monitor group of an allocation properly

2019-06-10 Thread Wang Huaqiang
, then it is not necessary to create monitor group since it is already created. But if an monitor group is not an allocation default group, you should create the group under folder '/sys/fs/resctrl/mon_groups' and fill the vcpu PIDs to 'tasks' file. Signed-off-by: Wang Huaqiang --- src/libvirt_private.syms | 1

[libvirt] [PATCH 7/9] util: Refactor 'virResctrlMonitorStats'

2019-05-23 Thread Wang Huaqiang
Refactor 'virResctrlMonitorStats' to track multiple statistical records. Signed-off-by: Wang Huaqiang --- src/qemu/qemu_driver.c | 2 +- src/util/virresctrl.c | 17 ++--- src/util/virresctrl.h | 12 ++-- 3 files changed, 25 insertions(+), 6 deletions(-) diff --git a/src

[libvirt] [PATCH 1/9] conf: code cleanup, remove empty line and one space

2019-05-23 Thread Wang Huaqiang
Remove some redundant space and line. Signed-off-by: Wang Huaqiang --- src/conf/domain_conf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index a3a5141..e3c8aa0 100644 --- a/src/conf/domain_conf.c +++ b/src/conf

[libvirt] [PATCH 0/9] util/resctrl cleanups and refactors

2019-05-23 Thread Wang Huaqiang
functionality, but with capability to be used for retrieving MBM statistical information. 4. Refactoring 'virResctrlMonitorFreeStats' for more reusing in code. 5. Extend data structure 'virResctrlMonitorStats' with the capability to carry multiple statistical information from monitor. Wang Huaqiang

[libvirt] [PATCH 3/9] conf: check if vcpus matches with any 'existing' allocaiton

2019-05-23 Thread Wang Huaqiang
In checking if vcpus matches with any exisitng resctrl allocation it should consider if the allocation exists or not. '@resctrl->alloc != NULL' means an allocation exists. Signed-off-by: Wang Huaqiang --- src/conf/domain_conf.c | 9 - 1 file changed, 4 insertions(+), 5 deleti

[libvirt] [PATCH 5/9] conf: refactor 'virDomainResctrlVcpuMatch'

2019-05-23 Thread Wang Huaqiang
Let 'virDomainResctrlVcpuMatch' return a pointer of @virDomainResctrlDefPtr in its third parameter. Signed-off-by: Wang Huaqiang --- src/conf/domain_conf.c | 33 ++--- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf

[libvirt] [PATCH 8/9] util: Extend virresctl API to retrieve multiple monitor statistics

2019-05-23 Thread Wang Huaqiang
Export virResctrlMonitorGetStats and make virResctrlMonitorGetCacheOccupancy obsoleted. Signed-off-by: Wang Huaqiang --- src/libvirt_private.syms | 1 + src/qemu/qemu_driver.c | 33 + src/util/virresctrl.c| 46

[libvirt] [PATCH 6/9] util: Refactor 'virResctrlMonitorFreeStats'

2019-05-23 Thread Wang Huaqiang
Refactor 'virResctrlMonitorFreeStats' to let it available to free the 'virResctrlMonitorStatsPtr' variable. Signed-off-by: Wang Huaqiang --- src/qemu/qemu_driver.c | 1 + src/util/virresctrl.c | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src

[libvirt] [PATCH 9/9] util: Remove unused virResctrlMonitorGetCacheOccupancy

2019-05-23 Thread Wang Huaqiang
Signed-off-by: Wang Huaqiang --- src/libvirt_private.syms | 1 - src/util/virresctrl.c| 29 - src/util/virresctrl.h| 5 - 3 files changed, 35 deletions(-) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 2e3d48c..41733cc 100644

[libvirt] [PATCH 2/9] conf: code cleanup for return error code directly

2019-05-23 Thread Wang Huaqiang
code cleanup for 'virDomainCachetuneDefParse' and 'virDomainMemorytuneDefParse'. Signed-off-by: Wang Huaqiang --- src/conf/domain_conf.c | 46 +- 1 file changed, 21 insertions(+), 25 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf

[libvirt] [PATCH 4/9] conf: Replace 'virResctrlAllocIsEmpty' with @n==0 for indicating no resctrl allocation in configuration file

2019-05-23 Thread Wang Huaqiang
, this role could be replaced with checking if @n is zero or not. This replacement is more efficient and avoiding a long function calling path. Signed-off-by: Wang Huaqiang --- src/conf/domain_conf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf

[libvirt] [PATCH] util: fix a bug found in sorting cache monitor results

2019-05-10 Thread Wang Huaqiang
From: Huaqiang The qsort element is a pointer of virResctrlMonitorStats, and the comparing function's arguments have a type of pointer of virResctrlMonitorStatsPtr. Signed-off-by: Huaqiang --- src/util/virresctrl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

Re: [libvirt] [PATCH] CONF: bug, release 'alloc' object in cleanup

2019-04-29 Thread Wang, Huaqiang
My bad. Thanks. > -Original Message- > From: Peter Krempa [mailto:pkre...@redhat.com] > Sent: Monday, April 29, 2019 3:00 PM > To: Wang, Huaqiang > Cc: libvir-list@redhat.com > Subject: Re: [libvirt] [PATCH] CONF: bug, release 'alloc' object in cleanup > &

[libvirt] [PATCH] CONF: bug, release 'alloc' object in cleanup

2019-04-28 Thread Wang Huaqiang
In case error happens before 'alloc' is transferred to 'resctrl', the 'alloc' object should be released. Signed-off-by: Wang Huaqiang --- src/conf/domain_conf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 6331424..7d20276 100644

Re: [libvirt] [PATCHv10 0/4] Introduce x86 Cache Monitoring Technology (CMT)

2018-11-27 Thread Wang, Huaqiang
ate a fix tomorrow if you need. Huaqiang > -Original Message- > From: Wang, Huaqiang > Sent: Tuesday, November 27, 2018 11:21 AM > To: 'John Ferlan' ; libvir-list@redhat.com > Subject: RE: [PATCHv10 0/4] Introduce x86 Cache Monitoring Technology > (CMT) > > &g

[libvirt] [PATCHv10 2/2] cpu_map: Add Cascadelake Server CPU model

2018-11-26 Thread Wang Huaqiang
Cascadelake Server CPU is introduced in QEMU by commit c7a88b52f62b30c04158eeb07f73e3f72221b6a8, add the CPU model in libvirt accordingly. Signed-off-by: Wang Huaqiang --- src/cpu_map/Makefile.inc.am| 1 + src/cpu_map/index.xml | 1 + src/cpu_map/x86_Cascadelake

[libvirt] [PATCHv10 0/2] Add Cascadelake-SP CPU model

2018-11-26 Thread Wang Huaqiang
, the stepping number is not irrelevant any more. The CPU refresh from Skylake-SP to Cascadelake-SP is this kind of example. These two patches firstly introduce the stepping number as another factor to identify future Intel CPU, then introduce the Cascadelake-SP cpu model. Wang Huaqiang (2): cpu: Add x86

[libvirt] [PATCHv10 1/2] cpu: Add x86 stepping number as another factor to find candidate CPU

2018-11-26 Thread Wang Huaqiang
, the stepping number is not irrelevant any more. The CPU refresh from Skylake-SP to Cascadelake-SP is this kind of example. This patch add the stepping number as another factor to identify future Intel CPU. Signed-off-by: Wang Huaqiang --- src/cpu/cpu_x86.c | 60

Re: [libvirt] [PATCHv10 0/4] Introduce x86 Cache Monitoring Technology (CMT)

2018-11-26 Thread Wang, Huaqiang
> -Original Message- > From: John Ferlan [mailto:jfer...@redhat.com] > Sent: Tuesday, November 27, 2018 10:59 AM > To: Wang, Huaqiang ; libvir-list@redhat.com > Subject: Re: [PATCHv10 0/4] Introduce x86 Cache Monitoring Technology > (CMT) > > > > On 11

Re: [libvirt] [PATCHv10 0/4] Introduce x86 Cache Monitoring Technology (CMT)

2018-11-26 Thread Wang, Huaqiang
8 9:49 AM > To: Wang, Huaqiang ; libvir-list@redhat.com > Subject: Re: [PATCHv10 0/4] Introduce x86 Cache Monitoring Technology > (CMT) > > > > On 11/26/18 12:56 PM, Wang Huaqiang wrote: > > These patches are the remaining part for the CMT enabling series, and >

[libvirt] [PATCHv10 3/4] qemu: Report cache occupancy (CMT) with domstats

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

[libvirt] [PATCHv10 4/4] docs: Updated news.xml for CMT

2018-11-26 Thread Wang Huaqiang
Signed-off-by: Wang Huaqiang --- docs/news.xml | 12 1 file changed, 12 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index 4406aeb..deadb85 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -68,6 +68,18 @@ be viewed via the domain statistics

[libvirt] [PATCHv10 0/4] Introduce x86 Cache Monitoring Technology (CMT)

2018-11-26 Thread Wang Huaqiang
the names for new data structure and new functions. -. Merged qemuDomainGetStatsCpuResMonitorPerTag and qemuDomainGetStatsCpuResMonitor, and refined new function name based on the fact that we only support cache monitor now. Wang Huaqiang (4): util: Return a list of pointer

[libvirt] [PATCHv10 2/4] util: Add function to free monitor statistical data

2018-11-26 Thread Wang Huaqiang
The call of virResctrlMonitorGetStats will allocate the memory for holding cache occupancy or memory bandwidth statistics. This patch added an function, virResctrlMonitorFreeStats, as the opposing action of virResctrlMonitorGetStats to free these memory. Signed-off-by: Wang Huaqiang --- src

[libvirt] [PATCHv10 1/4] util: Return a list of pointer in virResctrlMonitorGetStats

2018-11-26 Thread Wang Huaqiang
Return a list of virResctrlMonitorStatsPtr instead of a virResctrlMonitorStats array in virResctrlMonitorGetStats. Signed-off-by: Wang Huaqiang --- src/util/virresctrl.c | 10 +- src/util/virresctrl.h | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/util

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

2018-11-26 Thread Wang, Huaqiang
在 11/24/2018 1:33 AM, John Ferlan 写道: On 11/20/18 8:56 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: 'ubuntu16.04

[libvirt] [PATCHv9 2/2] docs: Updated news.xml for CMT

2018-11-20 Thread Wang Huaqiang
Signed-off-by: Wang Huaqiang --- docs/news.xml | 12 1 file changed, 12 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index 4406aeb..deadb85 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -68,6 +68,18 @@ be viewed via the domain statistics

[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

[libvirt] [PATCHv9 0/2] Introduce x86 Cache Monitoring Technology (CMT

2018-11-20 Thread Wang Huaqiang
on the fact that we only support cache monitor now. Wang Huaqiang (2): qemu: Report cache occupancy (CMT) with domstats docs: Updated news.xml for CMT docs/news.xml | 12 src/libvirt-domain.c | 12 src/qemu/qemu_driver.c | 160

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

2018-11-20 Thread Wang, Huaqiang
> -Original Message- > From: Wang, Huaqiang > Sent: Thursday, November 15, 2018 8:41 PM > To: John Ferlan ; libvir-list@redhat.com > Cc: Feng, Shaohe ; Ding, Jian-feng feng.d...@intel.com>; Zang, Rui > Subject: RE: [PATCHv8 16/17] qemu: Report cache occupancy

[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

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

[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

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

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

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

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

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

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

  1   2   3   >