From nobody Mon Feb 9 07:38:19 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=1654606466; cv=none; d=zohomail.com; s=zohoarc; b=LZatSmOFC60UTKoJFsfpClAcGpec8QowyAdGcXuIhY5BpFYZCYRlZVTxIJJFYe4FzGJzU5ZzSBr60EWMxsuxOrPmcnB6Vvy1sJs2SbQKYcDCUt8tJg6d5h+DvjaLlU1Rxe9lMKrums+qByEY+dnkhHsdj3Q9c5lNpt77gaZTnAw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1654606466; 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=u7cs08Y5DE4gXba8+SInrUNLx7Hz2OuN7rZDbRJnql0=; b=Kv7qTYEa4kRzZRSsWr2UaPui0d7ox1cl9qlNlt8weTZ5uTSdwa4tIskYYHufghrZzirW32meMruJEIhqCgyPc6OFHUIZ8UsHVPbPpUpClMXVYBKjaz/Vv7VKT8Yjh9ImzMuVR3lsp10tKjoQYQ61VwwUORItmrrVcnwQ8PUBpE0= 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 1654606466858831.714409292112; Tue, 7 Jun 2022 05:54:26 -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-504-CsmbH5JMPvSNCXnoJSgNRw-1; Tue, 07 Jun 2022 08:53:18 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D1F1B824076; Tue, 7 Jun 2022 12:53:14 +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 BD75710725; Tue, 7 Jun 2022 12:53:14 +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 9876719452D2; Tue, 7 Jun 2022 12:53:14 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id CF1981947B86 for ; Tue, 7 Jun 2022 12:53:12 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id B08754050C43; Tue, 7 Jun 2022 12:53:12 +0000 (UTC) Received: from maggie.brq.redhat.com (unknown [10.34.246.222]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4365A4050C42 for ; Tue, 7 Jun 2022 12:53:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654606465; 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=u7cs08Y5DE4gXba8+SInrUNLx7Hz2OuN7rZDbRJnql0=; b=fIFjWINYlj1EnzwksTOzDrhcL2mAKH9OQfG6lD1v6xaAf2B3IxkJwiYwGXOLiXaLbUVP7+ vRaYI8RmCEAFceL2nllCK4te9lg5eBBijFXikxprxg6F9Pk6325KTYv7MCnieR65LEXxdA B2Uwa3PnrHFKdPaE+tiVlFGKg5PrVcc= X-MC-Unique: CsmbH5JMPvSNCXnoJSgNRw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH v2 15/15] qemu: Generate command line for main-loop pool size Date: Tue, 7 Jun 2022 14:52:59 +0200 Message-Id: <959a207e8434cb8f5932b501396ad82b7cbeba12.1654606121.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.11.54.2 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.79 on 10.11.54.5 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: 1654606468825100001 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