From nobody Mon Sep 21 21:55:54 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 38.145.34.151 as permitted sender) client-ip=38.145.34.151; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 38.145.34.151 as permitted sender) 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 [38.145.34.151]) by mx.zohomail.com with SMTPS id 1784746510691182.13113261013643; Wed, 22 Jul 2026 11:55:10 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 7698441BAA; Wed, 22 Jul 2026 14:55:09 -0400 (EDT) Received: from [172.19.199.10] (unknown [10.16.107.18]) by lists.libvirt.org (Postfix) with ESMTP id 547843F849; Wed, 22 Jul 2026 14:52:42 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 2BDA74187F; Wed, 22 Jul 2026 14:52:23 -0400 (EDT) Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id AECBD419D2 for ; Wed, 22 Jul 2026 14:52:21 -0400 (EDT) Received: from pps.filterd (m0360072.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 66MIBibS712843 for ; Wed, 22 Jul 2026 18:52:21 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 4fg7ahbbeg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 22 Jul 2026 18:52:20 +0000 (GMT) Received: from pps.filterd (ppma23.wdc07v.mail.ibm.com [127.0.0.1]) by ppma23.wdc07v.mail.ibm.com (8.18.1.7/8.18.1.7) with ESMTP id 66MIna9q025141 for ; Wed, 22 Jul 2026 18:52:20 GMT Received: from smtprelay03.dal12v.mail.ibm.com ([172.16.1.5]) by ppma23.wdc07v.mail.ibm.com (PPS) with ESMTPS id 4fgnah8nva-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 22 Jul 2026 18:52:20 +0000 (GMT) Received: from smtpav02.wdc07v.mail.ibm.com (smtpav02.wdc07v.mail.ibm.com [10.39.53.229]) by smtprelay03.dal12v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 66MIqIt432899620 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 22 Jul 2026 18:52:18 GMT Received: from smtpav02.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6F26A58067; Wed, 22 Jul 2026 18:52:18 +0000 (GMT) Received: from smtpav02.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0D25B5805D; Wed, 22 Jul 2026 18:52:18 +0000 (GMT) Received: from IBM-GLTZVH3.atx-us.ibm.com (unknown [9.16.36.179]) by smtpav02.wdc07v.mail.ibm.com (Postfix) with ESMTP; Wed, 22 Jul 2026 18:52:17 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc :content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=pp1; bh=0kNf2Qw4LfJY0A41N Bp0S4Re7y6TT0HHtSyesCk40Io=; b=Qbh5BU3xQzp0GoSgfPK5NANYwvyutU1zH 29HS3Ha1SLI5i/Lh2OApF39dU1my4gToxuwRcVXeG8AzGFcxgZ6IyDe9rzBvmZmY xnhzRlCn8K6Zf7cIHs1BhrV2B8qZ88D5lba8L3AoEu5Jy33Lq9m9P4WpoplGSPrk 9VBaQdUnZ8pT/vUyI4RYdwVJPGK1kXzm1JZASCTwf6X/IckgbVKNIEqbXOIHvU0q ilst4UEOY8ojn0AcY9heY9aXoU/bid4N7I40vF5rg+kCW4przIR3XB1nR8VJHheo X0uVLOJmGKktcMz46SB8HGmgBTghPOBsyPEpskzmShhk3anSbKocA== From: Jaehoon Kim To: devel@lists.libvirt.org Subject: [PATCH 1/6] conf: add iothread poll-weight XML support Date: Wed, 22 Jul 2026 13:52:10 -0500 Message-ID: <20260722185215.743245-2-jhkim@linux.ibm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260722185215.743245-1-jhkim@linux.ibm.com> References: <20260722185215.743245-1-jhkim@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: Qwi6bZMwzkKVNULjjYWAECdOdNpLiaz6 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNzIyMDE4NCBTYWx0ZWRfXyTuXftvEDBRN 4xxXJWXDbGhwJRPmcm9D2qmQDqYA7Lrx9oL1WC4D8tVi8hxZXpi/RwnqgNW1VanjAvRHB/GAJJq wjESC2IY8nwgU8p3aCGFi3ujUTPv3sIIu/rVZTU/weGGmGogSxN7bJmzW8B/0vXT5OBVac3xQiC qOVDdreGK6wUzAgPFO8gsId6jYMLlRnAVkj3E9S7Vroqjbp9Zl4ufkk3AeA02gwXeAl4wWyhgNo rafhYlhX+4F61gC0YsMpH2jYKedR7pQ968p8fRDA2SDyrVZPE4GpZoXDQh+pqszJoaYAYdxl2Mc A3JHXZy3NpybaccGhpkVaDY/b1Z5SaD7sHKSzyDAuXsya2wjgvMczZcDI9Z/X8g9y7xB4wZDq3c JEOR9WN+xfOBan3t3mQoawS1LUjrTPG9e1hTaYNkAf29CRqPszBRKJeTUtsgMbKdN4g9qLOcJXf Cut95/TuqSYV/MdcaTw== X-Proofpoint-Spam-Info: AW1haW4tMjYwNzIyMDE4NCBTYWx0ZWRfX2oNVsynHFevU FwFRXdSfM5Aw97kUU2agHXDVe3UK1lIaZTW50HgOsY8SCK3XaUhVrueE+DraUl1v2USCaNaaan8 nIfvfagOFg5VB7K/fHScUHW/JNtqoqU= X-Proofpoint-GUID: Qwi6bZMwzkKVNULjjYWAECdOdNpLiaz6 X-Authority-Analysis: v=2.4 cv=SM5ykuvH c=1 sm=1 tr=0 ts=6a611164 cx=c_pps a=3Bg1Hr4SwmMryq2xdFQyZA==:117 a=3Bg1Hr4SwmMryq2xdFQyZA==:17 a=RAioF0-LDSMA:10 a=VkNPw1HP01LnGYTKEx00:22 a=RnoormkPH1_aCDwRdu11:22 a=RzCfie-kr_QcCd8fBx8p:22 a=VnNF1IyMAAAA:8 a=ZxNuJSH-JvQX4jTvl6gA:9 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-07-22_05,2026-07-22_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 lowpriorityscore=0 bulkscore=0 suspectscore=0 adultscore=0 spamscore=0 malwarescore=0 priorityscore=1501 phishscore=0 impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2607220184 Message-ID-Hash: J257ERFA537KC6U4QULCTMXFV3WEJNQ5 X-Message-ID-Hash: J257ERFA537KC6U4QULCTMXFV3WEJNQ5 X-MailFrom: jhkim@linux.ibm.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: fiuczy@linux.ibm.com, shalini@linux.ibm.com, Jaehoon Kim X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1784746511558158501 Content-Type: text/plain; charset="utf-8" Add support for the iothread poll-weight XML attribute. Store the value in the internal iothread definition, parse it from the element, and format it back into domain XML. Also extend the schema to accept the new attribute and validate the accepted range of [0, 63]. Signed-off-by: Jaehoon Kim --- src/conf/domain_conf.c | 14 +++++++++++++- src/conf/domain_conf.h | 2 ++ src/conf/schemas/domaincommon.rng | 7 +++++++ tests/genericxml2xmlindata/iothreadids.xml | 2 +- 4 files changed, 23 insertions(+), 2 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 17c4a57cd8..f69317c36f 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -16984,7 +16984,9 @@ virDomainDefParseBootXML(xmlXPathContextPtr ctxt, * * 4 * - * + * + * + * * * * @@ -17032,6 +17034,12 @@ virDomainIOThreadIDDefParseXML(xmlNodePtr node) return NULL; =20 iothrid->set_poll_shrink =3D rc =3D=3D 1; + + if ((rc =3D virXMLPropUInt(pollNode, "weight", 10, VIR_XML_PROP_NO= NE, + &iothrid->poll_weight)) < 0) + return NULL; + + iothrid->set_poll_weight =3D rc =3D=3D 1; } =20 return g_steal_pointer(&iothrid); @@ -29011,6 +29019,7 @@ virDomainDefIothreadShouldFormat(const virDomainDef= *def) def->iothreadids[i]->set_poll_max_ns || def->iothreadids[i]->set_poll_grow || def->iothreadids[i]->set_poll_shrink || + def->iothreadids[i]->set_poll_weight || def->iothreadids[i]->thread_pool_min >=3D 0 || def->iothreadids[i]->thread_pool_max >=3D 0) return true; @@ -29084,6 +29093,9 @@ virDomainDefIOThreadsFormat(virBuffer *buf, if (iothread->set_poll_shrink) virBufferAsprintf(&pollAttrBuf, " shrink=3D'%llu'", iothre= ad->poll_shrink); =20 + if (iothread->set_poll_weight) + virBufferAsprintf(&pollAttrBuf, " weight=3D'%u'", iothread= ->poll_weight); + virXMLFormatElement(&iothreadChildBuf, "poll", &pollAttrBuf, N= ULL); =20 virXMLFormatElement(&childrenBuf, "iothread", &attrBuf, &iothr= eadChildBuf); diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 0c6c79c413..eebe55a093 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -2902,6 +2902,8 @@ struct _virDomainIOThreadIDDef { bool set_poll_grow; unsigned long long poll_shrink; bool set_poll_shrink; + unsigned int poll_weight; + bool set_poll_weight; =20 int thread_pool_min; int thread_pool_max; diff --git a/src/conf/schemas/domaincommon.rng b/src/conf/schemas/domaincom= mon.rng index 121e4e06a6..36743f81e4 100644 --- a/src/conf/schemas/domaincommon.rng +++ b/src/conf/schemas/domaincommon.rng @@ -990,6 +990,13 @@ + + + + 63 + + + diff --git a/tests/genericxml2xmlindata/iothreadids.xml b/tests/genericxml2= xmlindata/iothreadids.xml index 671a467295..e9814854eb 100644 --- a/tests/genericxml2xmlindata/iothreadids.xml +++ b/tests/genericxml2xmlindata/iothreadids.xml @@ -7,7 +7,7 @@ 1 - + --=20 2.54.0