Thanks Peter for above comments! 

My original design goal is exact the same as what QEMU doc says at 
https://github.com/qemu/qemu/blob/master/docs/throttle.txt:
"In this example the individual drives have IOPS limits of 2000, 2500
and 3000 respectively but the total combined I/O can never exceed 4000
IOPS."

I haven't thought about such case: "somebody would want to apply different 
throttling on a backing image", do we have such case design for other feature?

About configuring old throttling via the 'throttle' blockdev layer, it seems 
possible, however, this new design and implementation has dependency on QEMU6,  
the reason about this is that starting from QEMU6, "-object"(case to launching 
vm along with throttlegroup) supports json format value: e.g. -object 
'{"qom-type":"throttle-group","id":"limits0","limits":{"iops-total":200}}'), 
while for qemu4.2, non-stable API works: e.g. -object 
throttle-group,id=limits0,x-iops-total=200, current implementation follows json 
way:  it calls "qemuBuildObjectCommandlineFromJSON" to create throttle-group 
object, within "qemuBuildObjectCommandlineFromJSON", I see check about 
QEMU_CAPS_OBJECT_JSON: virQEMUCapsGet(qemuCaps, QEMU_CAPS_OBJECT_JSON)

in addition, for "object-add"(case to hot attach disk with throttles), it seems 
QMP json format is different between QEMU 6 and QEMU 4.2 ("props" required)

Reply via email to