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

Wang Huaqiang posted 4 patches 5 years, 4 months ago
Test syntax-check passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/1543254977-23949-1-git-send-email-huaqiang.wang@intel.com
docs/news.xml            |  12 ++++
src/libvirt-domain.c     |  12 ++++
src/libvirt_private.syms |   1 +
src/qemu/qemu_driver.c   | 183 ++++++++++++++++++++++++++++++++++++++++++++++-
src/util/virresctrl.c    |  26 +++++--
src/util/virresctrl.h    |   8 ++-
tools/virsh.pod          |  14 ++++
7 files changed, 248 insertions(+), 8 deletions(-)
[libvirt] [PATCHv10 0/4] Introduce x86 Cache Monitoring Technology (CMT)
Posted by Wang Huaqiang 5 years, 4 months ago
These patches are the remaining part for the CMT enabling series,
and most of the series have been merged.

This series is addressing John's review comments and suggestions,
which are
https://www.redhat.com/archives/libvir-list/2018-November/msg00907.html
https://www.redhat.com/archives/libvir-list/2018-November/msg00510.html
https://www.redhat.com/archives/libvir-list/2018-November/msg00561.html

Change lists:
Changes in v10:
-. Add tag (virResctrlMonitorType) in qemuDomainGetResctrlMonData, thus
   qemuDomainGetResctrlMonData could be reused for MBM.
-. Using VIR_APPEND_ELEMENT to append virQEMUResctrlMonDataPtr list.
-. Add qemuDomainFreeResctrlMonData.
-. Add virResctrlMonitorFreeStats.
-. Return a list of virResctrlMonitorStatsPtr instead of
   a virResctrlMonitorStats array in virResctrlMonitorGetStats.

Changes in V9:
-. Addressing code review comments form John.
-. Refined 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 in virResctrlMonitorGetStats
  util: Add function to free monitor statistical data
  qemu: Report cache occupancy (CMT) with domstats
  docs: Updated news.xml for CMT

 docs/news.xml            |  12 ++++
 src/libvirt-domain.c     |  12 ++++
 src/libvirt_private.syms |   1 +
 src/qemu/qemu_driver.c   | 183 ++++++++++++++++++++++++++++++++++++++++++++++-
 src/util/virresctrl.c    |  26 +++++--
 src/util/virresctrl.h    |   8 ++-
 tools/virsh.pod          |  14 ++++
 7 files changed, 248 insertions(+), 8 deletions(-)

-- 
2.7.4

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCHv10 0/4] Introduce x86 Cache Monitoring Technology (CMT)
Posted by John Ferlan 5 years, 4 months ago

On 11/26/18 12:56 PM, Wang Huaqiang wrote:
> These patches are the remaining part for the CMT enabling series,
> and most of the series have been merged.
> 
> This series is addressing John's review comments and suggestions,
> which are
> https://www.redhat.com/archives/libvir-list/2018-November/msg00907.html
> https://www.redhat.com/archives/libvir-list/2018-November/msg00510.html
> https://www.redhat.com/archives/libvir-list/2018-November/msg00561.html
> 
> Change lists:
> Changes in v10:
> -. Add tag (virResctrlMonitorType) in qemuDomainGetResctrlMonData, thus
>    qemuDomainGetResctrlMonData could be reused for MBM.
> -. Using VIR_APPEND_ELEMENT to append virQEMUResctrlMonDataPtr list.
> -. Add qemuDomainFreeResctrlMonData.
> -. Add virResctrlMonitorFreeStats.
> -. Return a list of virResctrlMonitorStatsPtr instead of
>    a virResctrlMonitorStats array in virResctrlMonitorGetStats.
> 
> Changes in V9:
> -. Addressing code review comments form John.
> -. Refined 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 in virResctrlMonitorGetStats
>   util: Add function to free monitor statistical data
>   qemu: Report cache occupancy (CMT) with domstats
>   docs: Updated news.xml for CMT
> 
>  docs/news.xml            |  12 ++++
>  src/libvirt-domain.c     |  12 ++++
>  src/libvirt_private.syms |   1 +
>  src/qemu/qemu_driver.c   | 183 ++++++++++++++++++++++++++++++++++++++++++++++-
>  src/util/virresctrl.c    |  26 +++++--
>  src/util/virresctrl.h    |   8 ++-
>  tools/virsh.pod          |  14 ++++
>  7 files changed, 248 insertions(+), 8 deletions(-)
> 

Reviewed-by: John Ferlan <jferlan@redhat.com>
(series)

and pushed,

John

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCHv10 0/4] Introduce x86 Cache Monitoring Technology (CMT)
Posted by Wang, Huaqiang 5 years, 4 months ago
Hi John,

Really appreciate your hard work for the CMT series. Next I'll working on the MBM.

In testing the newly pushed code, I find a problem:

<error message>
[david@dl-c200 ~]$ sudo virsh domstats
error: An error occurred, but the cause is unknown
</error message>

seems it is caused by qemuDomainGetStatsIOThread not by the new series.
What I test is return 0 immediately at top of qemuDomainGetStatsIOThread, the
command 'virsh domstats' reports the cache statistics normally.

BR
Huaqiang

> -----Original Message-----
> From: John Ferlan [mailto:jferlan@redhat.com]
> Sent: Tuesday, November 27, 2018 9:49 AM
> To: Wang, Huaqiang <huaqiang.wang@intel.com>; 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
> > most of the series have been merged.
> >
> > This series is addressing John's review comments and suggestions,
> > which are
> > https://www.redhat.com/archives/libvir-list/2018-
> November/msg00907.htm
> > l
> > https://www.redhat.com/archives/libvir-list/2018-
> November/msg00510.htm
> > l
> > https://www.redhat.com/archives/libvir-list/2018-
> November/msg00561.htm
> > l
> >
> > Change lists:
> > Changes in v10:
> > -. Add tag (virResctrlMonitorType) in qemuDomainGetResctrlMonData,
> thus
> >    qemuDomainGetResctrlMonData could be reused for MBM.
> > -. Using VIR_APPEND_ELEMENT to append virQEMUResctrlMonDataPtr
> list.
> > -. Add qemuDomainFreeResctrlMonData.
> > -. Add virResctrlMonitorFreeStats.
> > -. Return a list of virResctrlMonitorStatsPtr instead of
> >    a virResctrlMonitorStats array in virResctrlMonitorGetStats.
> >
> > Changes in V9:
> > -. Addressing code review comments form John.
> > -. Refined 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 in virResctrlMonitorGetStats
> >   util: Add function to free monitor statistical data
> >   qemu: Report cache occupancy (CMT) with domstats
> >   docs: Updated news.xml for CMT
> >
> >  docs/news.xml            |  12 ++++
> >  src/libvirt-domain.c     |  12 ++++
> >  src/libvirt_private.syms |   1 +
> >  src/qemu/qemu_driver.c   | 183
> ++++++++++++++++++++++++++++++++++++++++++++++-
> >  src/util/virresctrl.c    |  26 +++++--
> >  src/util/virresctrl.h    |   8 ++-
> >  tools/virsh.pod          |  14 ++++
> >  7 files changed, 248 insertions(+), 8 deletions(-)
> >
> 
> Reviewed-by: John Ferlan <jferlan@redhat.com>
> (series)
> 
> and pushed,
> 
> John

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCHv10 0/4] Introduce x86 Cache Monitoring Technology (CMT)
Posted by John Ferlan 5 years, 4 months ago

On 11/26/18 9:39 PM, Wang, Huaqiang wrote:
> Hi John,
> 
> Really appreciate your hard work for the CMT series. Next I'll working on the MBM.
> 
> In testing the newly pushed code, I find a problem:
> 
> <error message>
> [david@dl-c200 ~]$ sudo virsh domstats
> error: An error occurred, but the cause is unknown
> </error message>
> 

I couldn't reproduced in a quick test here. Can you get a thread trace
of the failure?

What I usually do, build libvirt, then in a terminal session at the top
of the git tree "./run gdb src/libvirtd"  (dbg> r)... THen in another
terminal session run the virsh command and when the libvirtd session
stops do a "t a a bt" (thread apply all backtrace)...

John

(done for the night)

> seems it is caused by qemuDomainGetStatsIOThread not by the new series.
> What I test is return 0 immediately at top of qemuDomainGetStatsIOThread, the
> command 'virsh domstats' reports the cache statistics normally.
> 
> BR
> Huaqiang
> 
>> -----Original Message-----
>> From: John Ferlan [mailto:jferlan@redhat.com]
>> Sent: Tuesday, November 27, 2018 9:49 AM
>> To: Wang, Huaqiang <huaqiang.wang@intel.com>; 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
>>> most of the series have been merged.
>>>
>>> This series is addressing John's review comments and suggestions,
>>> which are
>>> https://www.redhat.com/archives/libvir-list/2018-
>> November/msg00907.htm
>>> l
>>> https://www.redhat.com/archives/libvir-list/2018-
>> November/msg00510.htm
>>> l
>>> https://www.redhat.com/archives/libvir-list/2018-
>> November/msg00561.htm
>>> l
>>>
>>> Change lists:
>>> Changes in v10:
>>> -. Add tag (virResctrlMonitorType) in qemuDomainGetResctrlMonData,
>> thus
>>>    qemuDomainGetResctrlMonData could be reused for MBM.
>>> -. Using VIR_APPEND_ELEMENT to append virQEMUResctrlMonDataPtr
>> list.
>>> -. Add qemuDomainFreeResctrlMonData.
>>> -. Add virResctrlMonitorFreeStats.
>>> -. Return a list of virResctrlMonitorStatsPtr instead of
>>>    a virResctrlMonitorStats array in virResctrlMonitorGetStats.
>>>
>>> Changes in V9:
>>> -. Addressing code review comments form John.
>>> -. Refined 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 in virResctrlMonitorGetStats
>>>   util: Add function to free monitor statistical data
>>>   qemu: Report cache occupancy (CMT) with domstats
>>>   docs: Updated news.xml for CMT
>>>
>>>  docs/news.xml            |  12 ++++
>>>  src/libvirt-domain.c     |  12 ++++
>>>  src/libvirt_private.syms |   1 +
>>>  src/qemu/qemu_driver.c   | 183
>> ++++++++++++++++++++++++++++++++++++++++++++++-
>>>  src/util/virresctrl.c    |  26 +++++--
>>>  src/util/virresctrl.h    |   8 ++-
>>>  tools/virsh.pod          |  14 ++++
>>>  7 files changed, 248 insertions(+), 8 deletions(-)
>>>
>>
>> Reviewed-by: John Ferlan <jferlan@redhat.com>
>> (series)
>>
>> and pushed,
>>
>> John

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCHv10 0/4] Introduce x86 Cache Monitoring Technology (CMT)
Posted by Wang, Huaqiang 5 years, 4 months ago

> -----Original Message-----
> From: John Ferlan [mailto:jferlan@redhat.com]
> Sent: Tuesday, November 27, 2018 10:59 AM
> To: Wang, Huaqiang <huaqiang.wang@intel.com>; libvir-list@redhat.com
> Subject: Re: [PATCHv10 0/4] Introduce x86 Cache Monitoring Technology
> (CMT)
> 
> 
> 
> On 11/26/18 9:39 PM, Wang, Huaqiang wrote:
> > Hi John,
> >
> > Really appreciate your hard work for the CMT series. Next I'll working on
> the MBM.
> >
> > In testing the newly pushed code, I find a problem:
> >
> > <error message>
> > [david@dl-c200 ~]$ sudo virsh domstats
> > error: An error occurred, but the cause is unknown </error message>
> >
> 
> I couldn't reproduced in a quick test here. Can you get a thread trace of the
> failure?
> 
> What I usually do, build libvirt, then in a terminal session at the top of the
> git tree "./run gdb src/libvirtd"  (dbg> r)... THen in another terminal session
> run the virsh command and when the libvirtd session stops do a "t a a bt"
> (thread apply all backtrace)...
> 
> John

I'll trace the error. 

Thanks.
Huaqiang

> 
> (done for the night)
> 
> > seems it is caused by qemuDomainGetStatsIOThread not by the new
> series.
> > What I test is return 0 immediately at top of
> > qemuDomainGetStatsIOThread, the command 'virsh domstats' reports
> the cache statistics normally.
> >
> > BR
> > Huaqiang
> >
> >> -----Original Message-----
> >> From: John Ferlan [mailto:jferlan@redhat.com]
> >> Sent: Tuesday, November 27, 2018 9:49 AM
> >> To: Wang, Huaqiang <huaqiang.wang@intel.com>; 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 most of the series have been merged.
> >>>
> >>> This series is addressing John's review comments and suggestions,
> >>> which are
> >>> https://www.redhat.com/archives/libvir-list/2018-
> >> November/msg00907.htm
> >>> l
> >>> https://www.redhat.com/archives/libvir-list/2018-
> >> November/msg00510.htm
> >>> l
> >>> https://www.redhat.com/archives/libvir-list/2018-
> >> November/msg00561.htm
> >>> l
> >>>
> >>> Change lists:
> >>> Changes in v10:
> >>> -. Add tag (virResctrlMonitorType) in qemuDomainGetResctrlMonData,
> >> thus
> >>>    qemuDomainGetResctrlMonData could be reused for MBM.
> >>> -. Using VIR_APPEND_ELEMENT to append virQEMUResctrlMonDataPtr
> >> list.
> >>> -. Add qemuDomainFreeResctrlMonData.
> >>> -. Add virResctrlMonitorFreeStats.
> >>> -. Return a list of virResctrlMonitorStatsPtr instead of
> >>>    a virResctrlMonitorStats array in virResctrlMonitorGetStats.
> >>>
> >>> Changes in V9:
> >>> -. Addressing code review comments form John.
> >>> -. Refined 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 in virResctrlMonitorGetStats
> >>>   util: Add function to free monitor statistical data
> >>>   qemu: Report cache occupancy (CMT) with domstats
> >>>   docs: Updated news.xml for CMT
> >>>
> >>>  docs/news.xml            |  12 ++++
> >>>  src/libvirt-domain.c     |  12 ++++
> >>>  src/libvirt_private.syms |   1 +
> >>>  src/qemu/qemu_driver.c   | 183
> >> ++++++++++++++++++++++++++++++++++++++++++++++-
> >>>  src/util/virresctrl.c    |  26 +++++--
> >>>  src/util/virresctrl.h    |   8 ++-
> >>>  tools/virsh.pod          |  14 ++++
> >>>  7 files changed, 248 insertions(+), 8 deletions(-)
> >>>
> >>
> >> Reviewed-by: John Ferlan <jferlan@redhat.com>
> >> (series)
> >>
> >> and pushed,
> >>
> >> John

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list