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

Huaqiang,Wang huaqiang.wang at intel.com
Thu May 30 09:56:35 UTC 2019



On 2019年05月28日 16:32, Huaqiang,Wang wrote:
>
>
> On 2019年05月27日 23:26, Michal Privoznik wrote:
>> On 5/23/19 11:34 AM, Wang Huaqiang wrote:
>>> Plan to support Resctrl Control Monitors, which is a feature introduced
>>> by kernel 'resctrl' sub-model. Submit some cleanup and refactoring 
>>> patches
>>> for upcoming memory bandwidth resource monitoring (MBM) monitors.
>>>
>>> Related MBM RFC is
>>> https://www.redhat.com/archives/libvir-list/2019-April/msg01409.html.
>>> This RFC is not actively discussed since libvirt already implemented 
>>> similar
>>> resctrl cache monitoring (CMT), and lots details have been discussed
>>> and implemented during the work of CMT.
>>>
>>> The cleanups and refactoring includes:
>>> 1. Removing some reluctant lines and white spaces that is existing
>>> in current code and not meet the libvirt coding style.
>>> 2. Replace 'virResctrlAllocIsEmpty' with @n==0 for indicating no
>>> resctrl allocation in configuration file.
>>> 3. Private API changes, removed 'virResctrlMonitorGetCacheOccupancy'
>>> and exported a new API named 'virResctrlMonitorGetStats' with similar
>>> 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 (9):
>>>    conf: code cleanup, remove empty line and one space
>>>    conf: code cleanup for return error code directly
>>>    conf: check if vcpus matches with any 'existing' allocaiton
>>>    conf: Replace 'virResctrlAllocIsEmpty' with @n==0 for indicating no
>>>      resctrl allocation in configuration file
>>>    conf: refactor 'virDomainResctrlVcpuMatch'
>>>    util: Refactor 'virResctrlMonitorFreeStats'
>>>    util: Refactor 'virResctrlMonitorStats'
>>>    util: Extend virresctl API to retrieve multiple monitor statistics
>>>    util: Remove unused virResctrlMonitorGetCacheOccupancy
>>>
>>>   src/conf/domain_conf.c   | 89 
>>> +++++++++++++++++++++++-------------------------
>>>   src/libvirt_private.syms |  2 +-
>>>   src/qemu/qemu_driver.c   | 36 +++++++++++++++-----
>>>   src/util/virresctrl.c    | 68 +++++++++++++++---------------------
>>>   src/util/virresctrl.h    | 19 ++++++++---
>>>   5 files changed, 113 insertions(+), 101 deletions(-)
>>>
>>
>> Patches look good, but there are some small issues that need fixing 
>> before I'd be able to push these. Looking forward to v2.
>>
>> Michal
>
> Hi Michal,
>
> Thanks for your kindly comments. I'll submit v2 patches shortly once 
> we achieved the consistence on
> the code changes.
>
> Br
> Huaqiang

Hi Michal,

I know we have achieved agreements on most of existing problems/comments 
for this series, but I could not
submit with v2 patches shortly, I hope I can make more tests on the 
functionality of all libvirt resctrl including
the MBM patches before I submit them. Just for your information.

BR
Huaqiang




More information about the libvir-list mailing list