From nobody Sat Feb 7 05:53:51 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1654695882; cv=none; d=zohomail.com; s=zohoarc; b=hfl0NBXCDooKN/KRAKpIZmJewBjFrigYgRbkSD9EZrYaWrAE9FVY44uxXz9THe3cyL+9IUeXf9fDBu+fYu9yqpxP0taR1cXOVcn5KwPnP745Fh97uBZCOeNf4SDRp9WH2U1ZuYv8Ahn1ZrxQhYwpKsD9YoCuWpFvB2FtBXICz2E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1654695882; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=PyHKy1u/iySEoDodWUnpFau/hEMUfDcwcWyzwpakU1I=; b=eEcPlowuDUnY1zL74lSR+ncc4q+Zz0NhwWH4wXxvmX5chQqvkxtH7Kwvrw++aeoLGCP9ym8lfNRn4lrokPnIXpreE9tIQEUMjKudhO1bvorT8jnrRDkAVkH27e9DWwbM5Qpq5s19zy1TF+R6sU390owdA0mlQKhstuG5cC8k8ZE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1654695882524276.7435090868935; Wed, 8 Jun 2022 06:44:42 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-78-C_uxhoiXPkK707xNdarciA-1; Wed, 08 Jun 2022 09:44:40 -0400 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9EA89801756; Wed, 8 Jun 2022 13:44:37 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8BCD64328C9; Wed, 8 Jun 2022 13:44:37 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 471A41947041; Wed, 8 Jun 2022 13:44:37 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 137531947040 for ; Wed, 8 Jun 2022 13:43:20 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id EEEB9492CA3; Wed, 8 Jun 2022 13:43:19 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.180]) by smtp.corp.redhat.com (Postfix) with ESMTP id 97D2C492C3B for ; Wed, 8 Jun 2022 13:43:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654695881; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=PyHKy1u/iySEoDodWUnpFau/hEMUfDcwcWyzwpakU1I=; b=esblCOVOZTboAqDoAXfdnjpb2KG1DubEImwXa6MAWMJrm/UTQ2KpidyRkcQuFLiL211dYS w97vRfOv0rTikbtE4tyLFHMRiERzeYbFZAlqJstf+MdhS64Eo/ioR8nueTBJqxUcghjDTj tboULDPANExkAAEhAFL9rzYJt3b7LuM= X-MC-Unique: C_uxhoiXPkK707xNdarciA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH v3 15/15] qemu: Generate command line for pool size Date: Wed, 8 Jun 2022 15:43:09 +0200 Message-Id: <8e93867215a86141e5e3264260e4f5f463c6489a.1654695585.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.85 on 10.11.54.10 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1654695884481100001 Content-Type: text/plain; charset="utf-8"; x-default="true" Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=3D2059511 Signed-off-by: Michal Privoznik Reviewed-by: Peter Krempa --- src/qemu/qemu_command.c | 16 +++++++++++++--- .../iothreads-ids-pool-sizes.x86_64-latest.args | 1 + 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 2734be7679..be20053c0d 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -7436,9 +7436,6 @@ qemuBuildIOThreadCommandLine(virCommand *cmd, { size_t i; =20 - if (def->niothreadids =3D=3D 0) - return 0; - for (i =3D 0; i < def->niothreadids; i++) { g_autoptr(virJSONValue) props =3D NULL; const virDomainIOThreadIDDef *iothread =3D def->iothreadids[i]; @@ -7456,6 +7453,19 @@ qemuBuildIOThreadCommandLine(virCommand *cmd, return -1; } =20 + if (def->defaultIOThread) { + g_autoptr(virJSONValue) props =3D NULL; + + if (qemuMonitorCreateObjectProps(&props, "main-loop", "main-loop", + "k:thread-pool-min", def->default= IOThread->thread_pool_min, + "k:thread-pool-max", def->default= IOThread->thread_pool_max, + NULL) < 0) + return -1; + + if (qemuBuildObjectCommandlineFromJSON(cmd, props, qemuCaps) < 0) + return -1; + } + return 0; } =20 diff --git a/tests/qemuxml2argvdata/iothreads-ids-pool-sizes.x86_64-latest.= args b/tests/qemuxml2argvdata/iothreads-ids-pool-sizes.x86_64-latest.args index 32517e3d29..12747b51f0 100644 --- a/tests/qemuxml2argvdata/iothreads-ids-pool-sizes.x86_64-latest.args +++ b/tests/qemuxml2argvdata/iothreads-ids-pool-sizes.x86_64-latest.args @@ -22,6 +22,7 @@ XDG_CONFIG_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.config \ -object '{"qom-type":"iothread","id":"iothread1"}' \ -object '{"qom-type":"iothread","id":"iothread3"}' \ -object '{"qom-type":"iothread","id":"iothread5"}' \ +-object '{"qom-type":"main-loop","id":"main-loop","thread-pool-min":8,"thr= ead-pool-max":16}' \ -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ -display none \ -no-user-config \ --=20 2.35.1