On Mon, Nov 18, 2024 at 19:24:10 +0530, Harikumar R wrote:
From: Chun Feng Wu <danielwuwy(a)163.com>
Introduce schema for defining '<throttlefilters>' element which
references throttling groups to form filter chain in qemu for specific
disk
* Add new elements '<throttlefilters>'
* <ThrottleFilters> can include multiple throttlegroup references to
form filter chain in qemu
* Chained throttle filters feature in qemu is described at
https://github.com/qemu/qemu/blob/master/docs/throttle.txt
qemu uses gitlab as main project forge so
https://gitlab.com/qemu-project/qemu/ ...
Signed-off-by: Chun Feng Wu <danielwuwy(a)163.com>
---
docs/formatdomain.rst | 21 +++++++++++++++++++++
src/conf/schemas/domaincommon.rng | 19 ++++++++++++++++++-
2 files changed, 39 insertions(+), 1 deletion(-)
diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst
index 5b7f18b2f0..0c41b47a77 100644
--- a/docs/formatdomain.rst
+++ b/docs/formatdomain.rst
@@ -2753,6 +2753,15 @@ paravirtualized driver is specified via the ``disk`` element.
<source dev='/dev/vhost-vdpa-0' />
<target dev='vdg' bus='virtio'/>
</disk>
+ <disk type='file' device='disk'>
+ <driver name='qemu' type='qcow2' />
+ <source file='/var/lib/libvirt/images/disk.qcow2'/>
+ <target dev='vdh' bus='virtio'/>
This had a rebase conflict as another example was added recently, don't
forget to bump to 'vdg' when resovling the conflict.
+ <throttlefilters>
+ <throttlefilter group='limit2'/>
+ <throttlefilter group='limit012'/>
+ </throttlefilters>
+ </disk>
</devices>
...
@@ -3233,6 +3242,18 @@ paravirtualized driver is specified via the ``disk`` element.
:since:`since after 0.4.4`; "sata" attribute value :since:`since 0.9.7`;
"removable" attribute value :since:`since 1.1.3`;
"rotation_rate" attribute value :since:`since 7.3.0`
+``throttlefilters``
+ The optional ``throttlefilters`` element provides the ability to provide additional
+ per-device throttle chain :since:`Since 10.7.0`
11.0.0
+ For example, if we have four different disks and we want to limit
I/O for each one
+ and we also want to limit combined I/O of all four disks, we can leverage
+ ``throttlefilters`` to achieve this goal by setting two ``throttlefilter`` for
+ each disk: disk's own filter(e.g. limit2) and combined filter(e.g. limit012).
+ The order of such ``throttlefilter`` doesn't matter within ``throttlefilters``.
+ ``throttlefilters`` and ``iotune`` should be used exclusively.
+
+ ``throttlefilter``
+ The optional ``throttlefilter`` element is to reference defined throttle group.
``iotune``
The optional ``iotune`` element provides the ability to provide additional
per-device I/O tuning, with values that can vary for each device (contrast
Reviewed-by: Peter Krempa <pkrempa(a)redhat.com>