From nobody Sat Feb 7 10:44:29 2026 Delivered-To: importer@patchew.org Received-SPF: none (zohomail.com: 8.43.85.245 is neither permitted nor denied by domain of lists.libvirt.org) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; spf=none (zohomail.com: 8.43.85.245 is neither permitted nor denied by domain of lists.libvirt.org) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=fail(p=reject dis=none) header.from=linux.ibm.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1712719102670592.8380367512527; Tue, 9 Apr 2024 20:18:22 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 8D990167A; Tue, 9 Apr 2024 23:18:21 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id BCB351A31; Tue, 9 Apr 2024 23:15:16 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id B1DAD1920; Tue, 9 Apr 2024 23:15:09 -0400 (EDT) Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 498B71A6D for ; Tue, 9 Apr 2024 23:14:38 -0400 (EDT) Received: from pps.filterd (m0353726.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 43A2xMLs011356 for ; Wed, 10 Apr 2024 03:14:37 GMT Received: from ppma23.wdc07v.mail.ibm.com (5d.69.3da9.ip4.static.sl-reverse.com [169.61.105.93]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3xdj9qr12m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 10 Apr 2024 03:14:36 +0000 Received: from pps.filterd (ppma23.wdc07v.mail.ibm.com [127.0.0.1]) by ppma23.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 43A0fFAr029904 for ; Wed, 10 Apr 2024 03:14:35 GMT Received: from smtprelay05.wdc07v.mail.ibm.com ([172.16.1.72]) by ppma23.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3xbj7ma5dw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 10 Apr 2024 03:14:35 +0000 Received: from smtpav03.dal12v.mail.ibm.com (smtpav03.dal12v.mail.ibm.com [10.241.53.102]) by smtprelay05.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 43A3EWdw27722426 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 10 Apr 2024 03:14:34 GMT Received: from smtpav03.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4072E58056; Wed, 10 Apr 2024 03:14:32 +0000 (GMT) Received: from smtpav03.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 50FB15803F; Wed, 10 Apr 2024 03:14:31 +0000 (GMT) Received: from libvirt-dev-u221.fyre.ibm.com (unknown [9.112.252.183]) by smtpav03.dal12v.mail.ibm.com (Postfix) with ESMTP; Wed, 10 Apr 2024 03:14:31 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 From: wucf@linux.ibm.com To: devel@lists.libvirt.org Cc: Chun Feng Wu Subject: [PATCH RFC 06/12] schema: Add new domain elements to support multiple throttle filters Date: Tue, 9 Apr 2024 20:13:14 -0700 Message-Id: <20240410031320.1288203-7-wucf@linux.ibm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240410031320.1288203-1-wucf@linux.ibm.com> References: <20240410031320.1288203-1-wucf@linux.ibm.com> X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: D-qOGh5r2mzoDIzDIf4aCsLMZGZeFIYW X-Proofpoint-GUID: D-qOGh5r2mzoDIzDIf4aCsLMZGZeFIYW X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-04-09_12,2024-04-09_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 mlxlogscore=999 mlxscore=0 adultscore=0 priorityscore=1501 spamscore=0 clxscore=1015 lowpriorityscore=0 suspectscore=0 phishscore=0 malwarescore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2404010000 definitions=main-2404100022 Message-ID-Hash: A3PQD7PTD2LALKGAYCI2W4YPQS6OIQX5 X-Message-ID-Hash: A3PQD7PTD2LALKGAYCI2W4YPQS6OIQX5 X-MailFrom: wucf@linux.ibm.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1712719104473100001 From: Chun Feng Wu * Add new elements '' and '' * contains defintions * can include multiple throttlegroup references to form f= ilter chain in qemu * Chained throttle filters feature in qemu is described at https://github.c= om/qemu/qemu/blob/master/docs/throttle.txt Signed-off-by: Chun Feng Wu --- docs/formatdomain.rst | 48 +++++++++ src/conf/schemas/domaincommon.rng | 164 +++++++++++++++++++++++++++++- 2 files changed, 211 insertions(+), 1 deletion(-) diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst index e2f66b982c..ee9ee8b10c 100644 --- a/docs/formatdomain.rst +++ b/docs/formatdomain.rst @@ -1957,6 +1957,34 @@ advertisements to the guest OS. (NB: Only qemu drive= r support) the guest OS itself can choose to circumvent the unavailability of the = sleep states (e.g. S4 by turning off completely). =20 +Throttle Group Management +------------------------- + +:since:`Since 10.3.0` it is possible to create multiple named throttle gro= ups +and then reference them within ``throttlefilters`` to form filter chain in= QEMU for +specific disk. The limits(throttlegroups) are shared within domain, hence = the same group +can be referenced by different filters. + +:: + + + ... + + + limit0 + 10000000 + 400000 + 100000 + + + ... + + +All throttlegroups are listed within the ``throttlegroups`` element + +``throttlegroup`` + It has the same sub-elements as ``iotune`` (See `Hard drives, floppy di= sks, CDROMs`_), + The difference is that is required. =20 Hypervisor features ------------------- @@ -2704,6 +2732,15 @@ paravirtualized driver is specified via the ``disk``= element. + + + + + + + + + ... =20 @@ -3185,6 +3222,17 @@ 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 provid= e additional + per-device throttle chain :since:`Since 10.3.0` + For example, if we have four different disks and we want to limit I/O f= or each one + and we also want to limit combined I/O of all four disks, we can levera= ge + ``throttlefilters`` to achieve this goal by setting two ``throttlefilte= r`` for + each disk: disk's own filter and combined filter. ``throttlefilters`` a= nd ``iotune`` + should be used exclusively. + + ``throttlefilter`` + The optional ``throttlefilter`` element is to reference defined thro= ttle group. ``iotune`` The optional ``iotune`` element provides the ability to provide additio= nal per-device I/O tuning, with values that can vary for each device (contr= ast diff --git a/src/conf/schemas/domaincommon.rng b/src/conf/schemas/domaincom= mon.rng index f386e46fae..e77149c6ca 100644 --- a/src/conf/schemas/domaincommon.rng +++ b/src/conf/schemas/domaincommon.rng @@ -51,6 +51,7 @@ + @@ -1577,7 +1578,10 @@ - + + + + @@ -6637,6 +6641,164 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +