[libvirt] [PATCH 0/9] util/resctrl cleanups and refactors
Michal Privoznik
mprivozn at redhat.com
Mon May 27 15:26:49 UTC 2019
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
More information about the libvir-list
mailing list