On 10/27/2011 03:12 AM, Lei Li wrote:
1) Enable the blkio throttling in xml when guest is starting up. Add blkio throttling in xml as follows: <disk type='file' device='disk'> <driver name='qemu' type='raw'/> <source file='/var/lib/libvirt/images/kvm-one.img'/> <target dev='vda' bus='virtio'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> <iotune bps='n'.../> </disk> 2) Enable blkio throttling setting at guest running time. virsh blkiothrottle<domain> <device> [--bps<number>] [--bps_rd<number>] \ [--bps_wr<number>] [--iops<number>] [--iops_rd<number>] [--iops_wr<number>] 3) The support to get the current block i/o throttling for a device - HMP/QMP. virsh blkiothrottle<domain> <device>
Given that the XML is named <iotune> under <disk>, we should probably name the virsh command 'blkiotune' or 'disk-iotune', not 'blkiothrottle'.
Also, <iotune bps='n'.../> doesn't look right. This should be similar to the top-level XML. Here, taking into account the other proposal for per-block-device values (which can't be tied to individual <disk>):
<domain...> <blkiotune> <weight>800</weight> <device> <path>/path/to/device</path> <weight>200</weight> </device> </blkiotune> <devices> <disk ...> <iotune> <bps>800</bps> ... </iotune> </disk> </devices> </domain>
daemon/remote.c | 85 +++++++++++++++++ include/libvirt/libvirt.h.in | 25 +++++
Missing changes in docs/formatdomain.html.in (to describe the new XML), docs/schemas/domaincommon.rng (to validate the new xml), and tests/ (probably qemuxml2argvdata), to test it.
-- Eric Blake eblake@xxxxxxxxxx +1-801-349-2682 Libvirt virtualization library http://libvirt.org -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list