On Sat, Feb 15, 2025 at 04:35:50PM +0800, yong.huang(a)smartx.com wrote:
From: Hyman Huang <yong.huang(a)smartx.com>
This patchset is the prerequisite for the vCPU dirty-limit feature:
https://patchew.org/Libvirt/cover.1703135535.git.yong.huang@smartx.com/
Is the dirty limit migration strategy dependent on setting the dirty
limit beforehand?
As suggested by Daniel:
We've generally tried to avoid adding single purpose APIs for
tunable parameters, instead using APIs with virTypedParameter
arrays to allow bulk updates.
I note that we don't appear to have any mechanism currently
to set the VCPU scheduler tunables either
Perhaps we should have a more general
virDomainSetVCPUTuneParameters(virDomainPtr domain,
int vcpu,
virTypedParameterPtr params,
unsigned int params,
unsigned int flags);
Refer the following link to see more details:
https://patchew.org/Libvirt/169397083100.4628.15196043252714532301-0@git....
We present the qemuDomainSetVcpuTuneParameters API separately
because the patchset is somewhat self-contained.
Are you suggesting adding this API for now and then adding the dirty
limit and others into it? Please send it together with at least the
other typed parameters. If you want to wait with the migration stuff
and rest of the things, that's fine.
Please review,
Yong
Hyman Huang (3):
libvirt: Add virDomainSetVcpuTuneParameters API
qemu_driver: Implement qemuDomainSetVcpuTuneParameters
virsh: Use the new API to implement cmdSetvcpu
Also this last patch will make `virsh setvcpu` work only with new
daemon, but it should be able to work with older versions as well.
include/libvirt/libvirt-domain.h | 25 ++++++++++++++
src/driver-hypervisor.h | 8 +++++
src/libvirt-domain.c | 56 ++++++++++++++++++++++++++++++++
src/libvirt_public.syms | 5 +++
src/qemu/qemu_driver.c | 29 +++++++++++++++++
src/remote/remote_driver.c | 1 +
src/remote/remote_protocol.x | 20 +++++++++++-
tools/virsh-domain.c | 10 +++++-
8 files changed, 152 insertions(+), 2 deletions(-)
--
2.27.0