[PATCH v4 0/3] domstats:add haltpolling time statistic interface

Yang Fei posted 3 patches 2 years, 9 months ago
Failed in applying to current master (apply log)
docs/manpages/virsh.rst  |  4 ++++
src/libvirt-domain.c     |  7 +++++++
src/libvirt_private.syms |  2 ++
src/qemu/qemu_driver.c   | 20 ++++++++++++++++++++
src/util/virfile.c       | 24 ++++++++++++++++++++++++
src/util/virfile.h       |  2 ++
src/util/virhostcpu.c    | 39 +++++++++++++++++++++++++++++++++++++++
src/util/virhostcpu.h    |  4 ++++
8 files changed, 102 insertions(+)
[PATCH v4 0/3] domstats:add haltpolling time statistic interface
Posted by Yang Fei 2 years, 9 months ago
This series add the ability to statistic the halt polling time when
VM execute HLT(arm is WFI).

v1:
https://listman.redhat.com/archives/libvir-list/2021-July/msg00029.html
v2:
https://listman.redhat.com/archives/libvir-list/2021-July/msg00339.html
v3:
https://listman.redhat.com/archives/libvir-list/2021-July/msg00445.html

changes from v1:
- Move virGetCgroupValueRaw to utils.c and rename it virGetValueRaw. So
  that we can call it to obtain halt polling time.
- Helper function virGetCpuHaltPollTime and virGetDebugFsKvmValue are
  added in a separate patch
- Use STRPREFIX to match the path prefix.
- Fix the logic that domstats will break when platform is non-linux,
  debugfs isn't mounted and so on.

change from v2:
- Drop patch 1, use virFileReadValueUllong() to get halt polling data.
- Delete unnecessary error report in logs.
- Remove the qemuDomainGetStatsCpuHaltPollTime function conditionally
  compiled on linux.
- Document the new parameters in src/libvirt-domain.c.

change from v3:
- Add function virFileReadValueUllongQuiet without error report.
- Move virGetCpuHaltPollTime to src/util/virhostcpu.c and change the
  name to virHostCPUGetHaltPollTime.
- Replace the function which will report errors:
  virDirOpenIfExists -> virDirOpenQuiet
  virFileReadValueUllong -> virFileReadValueUllongQuiet

Yang Fei (3):
  util: Add virFileReadValueUllongQuiet
  util: Add virHostCPUGetHaltPollTime
  qemu: Introduce qemuDomainGetStatsCpuHaltPollTime

 docs/manpages/virsh.rst  |  4 ++++
 src/libvirt-domain.c     |  7 +++++++
 src/libvirt_private.syms |  2 ++
 src/qemu/qemu_driver.c   | 20 ++++++++++++++++++++
 src/util/virfile.c       | 24 ++++++++++++++++++++++++
 src/util/virfile.h       |  2 ++
 src/util/virhostcpu.c    | 39 +++++++++++++++++++++++++++++++++++++++
 src/util/virhostcpu.h    |  4 ++++
 8 files changed, 102 insertions(+)

-- 
2.23.0


Re: [PATCH v4 0/3] domstats:add haltpolling time statistic interface
Posted by Michal Prívozník 2 years, 9 months ago
On 7/22/21 10:04 AM, Yang Fei wrote:
> This series add the ability to statistic the halt polling time when
> VM execute HLT(arm is WFI).
> 
> v1:
> https://listman.redhat.com/archives/libvir-list/2021-July/msg00029.html
> v2:
> https://listman.redhat.com/archives/libvir-list/2021-July/msg00339.html
> v3:
> https://listman.redhat.com/archives/libvir-list/2021-July/msg00445.html
> 
> changes from v1:
> - Move virGetCgroupValueRaw to utils.c and rename it virGetValueRaw. So
>   that we can call it to obtain halt polling time.
> - Helper function virGetCpuHaltPollTime and virGetDebugFsKvmValue are
>   added in a separate patch
> - Use STRPREFIX to match the path prefix.
> - Fix the logic that domstats will break when platform is non-linux,
>   debugfs isn't mounted and so on.
> 
> change from v2:
> - Drop patch 1, use virFileReadValueUllong() to get halt polling data.
> - Delete unnecessary error report in logs.
> - Remove the qemuDomainGetStatsCpuHaltPollTime function conditionally
>   compiled on linux.
> - Document the new parameters in src/libvirt-domain.c.
> 
> change from v3:
> - Add function virFileReadValueUllongQuiet without error report.
> - Move virGetCpuHaltPollTime to src/util/virhostcpu.c and change the
>   name to virHostCPUGetHaltPollTime.
> - Replace the function which will report errors:
>   virDirOpenIfExists -> virDirOpenQuiet
>   virFileReadValueUllong -> virFileReadValueUllongQuiet
> 
> Yang Fei (3):
>   util: Add virFileReadValueUllongQuiet
>   util: Add virHostCPUGetHaltPollTime
>   qemu: Introduce qemuDomainGetStatsCpuHaltPollTime
> 
>  docs/manpages/virsh.rst  |  4 ++++
>  src/libvirt-domain.c     |  7 +++++++
>  src/libvirt_private.syms |  2 ++
>  src/qemu/qemu_driver.c   | 20 ++++++++++++++++++++
>  src/util/virfile.c       | 24 ++++++++++++++++++++++++
>  src/util/virfile.h       |  2 ++
>  src/util/virhostcpu.c    | 39 +++++++++++++++++++++++++++++++++++++++
>  src/util/virhostcpu.h    |  4 ++++
>  8 files changed, 102 insertions(+)
> 

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>

and pushed. Congratulations on your first libvirt contribution!

Michal

Re: [PATCH v4 0/3] domstats:add haltpolling time statistic interface
Posted by Yang Fei 2 years, 9 months ago

On 2021/7/27 16:31, Michal Prívozník wrote:
> On 7/22/21 10:04 AM, Yang Fei wrote:
>> This series add the ability to statistic the halt polling time when
>> VM execute HLT(arm is WFI).
>>
>> v1:
>> https://listman.redhat.com/archives/libvir-list/2021-July/msg00029.html
>> v2:
>> https://listman.redhat.com/archives/libvir-list/2021-July/msg00339.html
>> v3:
>> https://listman.redhat.com/archives/libvir-list/2021-July/msg00445.html
>>
>> changes from v1:
>> - Move virGetCgroupValueRaw to utils.c and rename it virGetValueRaw. So
>>   that we can call it to obtain halt polling time.
>> - Helper function virGetCpuHaltPollTime and virGetDebugFsKvmValue are
>>   added in a separate patch
>> - Use STRPREFIX to match the path prefix.
>> - Fix the logic that domstats will break when platform is non-linux,
>>   debugfs isn't mounted and so on.
>>
>> change from v2:
>> - Drop patch 1, use virFileReadValueUllong() to get halt polling data.
>> - Delete unnecessary error report in logs.
>> - Remove the qemuDomainGetStatsCpuHaltPollTime function conditionally
>>   compiled on linux.
>> - Document the new parameters in src/libvirt-domain.c.
>>
>> change from v3:
>> - Add function virFileReadValueUllongQuiet without error report.
>> - Move virGetCpuHaltPollTime to src/util/virhostcpu.c and change the
>>   name to virHostCPUGetHaltPollTime.
>> - Replace the function which will report errors:
>>   virDirOpenIfExists -> virDirOpenQuiet
>>   virFileReadValueUllong -> virFileReadValueUllongQuiet
>>
>> Yang Fei (3):
>>   util: Add virFileReadValueUllongQuiet
>>   util: Add virHostCPUGetHaltPollTime
>>   qemu: Introduce qemuDomainGetStatsCpuHaltPollTime
>>
>>  docs/manpages/virsh.rst  |  4 ++++
>>  src/libvirt-domain.c     |  7 +++++++
>>  src/libvirt_private.syms |  2 ++
>>  src/qemu/qemu_driver.c   | 20 ++++++++++++++++++++
>>  src/util/virfile.c       | 24 ++++++++++++++++++++++++
>>  src/util/virfile.h       |  2 ++
>>  src/util/virhostcpu.c    | 39 +++++++++++++++++++++++++++++++++++++++
>>  src/util/virhostcpu.h    |  4 ++++
>>  8 files changed, 102 insertions(+)
>>
> 
> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
> 
> and pushed. Congratulations on your first libvirt contribution!
> 
> Michal
> 
> .
> 
Hi Michal. Do I need to add a description to the file NEWS.rst, because the content
displayed by the domstats interface is changed?

Thanks,
Fei.


Re: [PATCH v4 0/3] domstats:add haltpolling time statistic interface
Posted by Michal Prívozník 2 years, 9 months ago
On 7/27/21 3:37 PM, Yang Fei wrote:
> 
> 

>>
> Hi Michal. Do I need to add a description to the file NEWS.rst, because the content
> displayed by the domstats interface is changed?

Yes, please and thank you.

Michal