[PATCH Libvirt v2 09/10] qemu_driver: Extend dirtlimit statistics for domGetStats

2023-08-07 Thread ~hyman
From: Hyman Huang(黄勇) Extend dirtylimit statistics for domGetStats to display the information of the upper limit of dirty page rate for virtual CPUs. Signed-off-by: Hyman Huang(黄勇) --- include/libvirt/libvirt-domain.h | 1 + src/libvirt-domain.c | 9 ++

[PATCH Libvirt v2 06/10] qemu_process: Setup dirty limit after launching VM

2023-08-07 Thread ~hyman
From: Hyman Huang(黄勇) The dirty_limit attribute in XML requires setting up the upper limit of dirty page rate once after launching the VM, so add the implementation. Signed-off-by: Hyman Huang(黄勇) --- src/qemu/qemu_process.c | 44 + 1 file changed, 44

[PATCH Libvirt v2 10/10] virsh: Introduce command 'virsh domstats --dirtylimit'

2023-08-07 Thread ~hyman
From: Hyman Huang(黄勇) Introduce command 'virsh domstats --dirtylimit' for reporting dirty page rate upper limit infomation. The info is listed as follows: Domain: 'vm' dirtylimit.vcpu.0.limit=10 dirtylimit.vcpu.0.current=16 dirtylimit.vcpu.1.limit=10 dirtylimit.vcpu.1.current=0 ...

[PATCH Libvirt v2 08/10] qemu_monitor: Implement qemuMonitorQueryVcpuDirtyLimit

2023-08-07 Thread ~hyman
From: Hyman Huang(黄勇) Implement qemuMonitorQueryVcpuDirtyLimit which query vcpu dirty limit info by calling qmp 'query-vcpu-dirty-limit'. Signed-off-by: Hyman Huang(黄勇) --- src/qemu/qemu_monitor.c | 12 +++ src/qemu/qemu_monitor.h | 17 ++ src/qemu/qemu_monitor_json.c |

[PATCH Libvirt v2 07/10] virsh: Introduce limit-dirty-page-rate api

2023-08-07 Thread ~hyman
From: Hyman Huang(黄勇) Introduce limit-dirty-page-rate virsh api to set or cancel dirty page rate upper limit for virtual CPUs. Usage is below: $ virsh limit-dirty-page-rate --rate \ [--vcpu ] Set the dirty page rate upper limit for the given vcpu specified by the "vcpu"; set for all

[PATCH Libvirt v2 04/10] qemu_driver: Implement qemuDomainSetVcpuDirtyLimit

2023-08-07 Thread ~hyman
From: Hyman Huang(黄勇) Implement qemuDomainSetVcpuDirtyLimit, which can be used to set or cancel the upper limit of the dirty page rate for virtual CPUs. Signed-off-by: Hyman Huang(黄勇) --- src/qemu/qemu_driver.c | 131 +++ src/qemu/qemu_monitor.c |

[PATCH Libvirt v2 05/10] domain_validate: Export virDomainDefHasDirtyLimitStartupVcpus symbol

2023-08-07 Thread ~hyman
From: Hyman Huang(黄勇) Export virDomainDefHasDirtyLimitStartupVcpus as a util function, which could be used in qemu_process.c file for the next commit. Signed-off-by: Hyman Huang(黄勇) --- src/conf/domain_validate.c | 2 +- src/conf/domain_validate.h | 2 ++ src/libvirt_private.syms | 1 + 3

[PATCH Libvirt v2 01/10] qemu_capabilities: Introduce QEMU_CAPS_VCPU_DIRTY_LIMIT capability

2023-08-07 Thread ~hyman
From: Hyman Huang(黄勇) set-vcpu-dirty-limit/cancel-vcpu-dirty-limit/query-vcpu-dirty-limit were introduced since qemu >=7.1.0. Introduce corresponding capability. Signed-off-by: Hyman Huang(黄勇) --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h

[PATCH Libvirt v2 02/10] conf: Introduce XML for dirty limit configuration

2023-08-07 Thread ~hyman
From: Hyman Huang(黄勇) The upper limit (MB/s) of the dirty page rate configured by the user can be tracked by the XML. To allow this, add the following XML: ... 3 ... The "dirty_limit" attribute in "vcpu" sub-element within "vcpus" element allows to set an upper limit for

[PATCH Libvirt v2 00/10] Support dirty page rate upper limit

2023-08-07 Thread ~hyman
Hi, This is the latest version for the series, comparing with version 1, there are some key modifications has made inspired and suggested by Peter, see as follows: 1. Introduce XML for dirty limit persistent configuration 2. Merge the cancel API into the set API 3. Extend the

[PATCH Libvirt v2 03/10] libvirt: Add virDomainSetVcpuDirtyLimit API

2023-08-07 Thread ~hyman
From: Hyman Huang(黄勇) Introduce virDomainSetVcpuDirtyLimit API to set or cancel the dirty page rate upper limit. The API will throttle the virtual CPU as needed to keep their dirty page rate within the limit set by @rate. Since it just throttles the virtual CPU, which dirties memory, read

[PATCH] conf: fix error message

2023-08-07 Thread Anastasia Belova
From: Анастасия Белова In case of invalid placement its value should be passed as a parameter of virReportError instead of mode. Fixes: 93e82727ec ("numatune: Encapsulate numatune configuration in order to unify results") Signed-off-by: Anastasia Belova --- src/conf/numa_conf.c | 2 +- 1

Re: [libvirt PATCH 5/5] qemu: Implement support for vDPA block devices

2023-08-07 Thread Peter Krempa
On Thu, Aug 03, 2023 at 09:48:01 +0200, Stefano Garzarella wrote: > On Wed, Aug 2, 2023 at 10:33 PM Jonathon Jongsma wrote: > > On 7/24/23 8:05 AM, Peter Krempa wrote: > > [...] > > > > > > > I've also noticed that using 'qcow2' format for the device doesn't work: > > > > > > error: internal

Re: [PATCH v2] lxc_container: Increase stack size for lxcContainerChild()

2023-08-07 Thread Martin Kletzander
On Fri, Aug 04, 2023 at 04:53:22PM +0200, Michal Privoznik wrote: When spawning a new container (via clone()) we allocate stack for lxcContainerChild(). So far, we allocate 4 pages for the stack and this used to be enough until we started rewriting everything to glib. With glib we switched to