From nobody Mon Feb 9 04:03:43 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=none dis=none) header.from=linux.microsoft.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 171015109875329.671210520408067; Mon, 11 Mar 2024 02:58:18 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id B44C45FF; Mon, 11 Mar 2024 05:58:17 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 890CD1E7C; Mon, 11 Mar 2024 05:45:17 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 0690E1C73; Mon, 11 Mar 2024 05:44:14 -0400 (EDT) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by lists.libvirt.org (Postfix) with ESMTP id EF6881A3F for ; Mon, 11 Mar 2024 05:44:11 -0400 (EDT) Received: from paekkaladevi-dev-u22.gi4irqh5pfqublruu4yyku2wof.phxx.internal.cloudapp.net (unknown [20.125.125.171]) by linux.microsoft.com (Postfix) with ESMTPSA id 204B020B74C6; Mon, 11 Mar 2024 02:44:10 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 204B020B74C6 From: Purna Pavan Chandra Aekkaladevi To: devel@lists.libvirt.org Subject: [PATCH 06/11] ch_driver: Refactor virCHProcessStart Date: Mon, 11 Mar 2024 09:44:02 +0000 Message-Id: <20240311094407.12217-7-paekkaladevi@linux.microsoft.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240311094407.12217-1-paekkaladevi@linux.microsoft.com> References: <20240311094407.12217-1-paekkaladevi@linux.microsoft.com> MIME-Version: 1.0 Message-ID-Hash: 7O7F7LKRF46LUGGAH7XANHVHHZ5OYECQ X-Message-ID-Hash: 7O7F7LKRF46LUGGAH7XANHVHHZ5OYECQ X-MailFrom: paekkaladevi@linux.microsoft.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 CC: prapal@linux.microsoft.com, paekkaladevi@microsoft.com, liuwe@microsoft.com, kumarpraveen@linux.microsoft.com, Purna Pavan Chandra Aekkaladevi 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: 1710151100137100001 Signed-off-by: Purna Pavan Chandra Aekkaladevi --- src/ch/ch_process.c | 47 ++++++++++++++++++++++++++++----------------- 1 file changed, 29 insertions(+), 18 deletions(-) diff --git a/src/ch/ch_process.c b/src/ch/ch_process.c index 4b360413fb..02749adfb6 100644 --- a/src/ch/ch_process.c +++ b/src/ch/ch_process.c @@ -460,6 +460,34 @@ virCHProcessSetupVcpus(virDomainObj *vm) return 0; } =20 +static int +virCHProcessSetup(virDomainObj *vm) +{ + virCHDomainObjPrivate *priv =3D vm->privateData; + + virCHDomainRefreshThreadInfo(vm); + + VIR_DEBUG("Setting emulator tuning/settings"); + if (virCHProcessSetupEmulatorThreads(vm) < 0) + return -1; + + VIR_DEBUG("Setting iothread tuning/settings"); + if (virCHProcessSetupIOThreads(vm) < 0) + return -1; + + VIR_DEBUG("Setting global CPU cgroup (if required)"); + if (virDomainCgroupSetupGlobalCpuCgroup(vm, + priv->cgroup) < 0) + return -1; + + VIR_DEBUG("Setting vCPU tuning/settings"); + if (virCHProcessSetupVcpus(vm) < 0) + return -1; + + virCHProcessUpdateInfo(vm); + return 0; +} + =20 #define PKT_TIMEOUT_MS 500 /* ms */ =20 @@ -763,26 +791,9 @@ virCHProcessStart(virCHDriver *driver, goto cleanup; } =20 - virCHDomainRefreshThreadInfo(vm); - - VIR_DEBUG("Setting emulator tuning/settings"); - if (virCHProcessSetupEmulatorThreads(vm) < 0) - goto cleanup; - - VIR_DEBUG("Setting iothread tuning/settings"); - if (virCHProcessSetupIOThreads(vm) < 0) - goto cleanup; - - VIR_DEBUG("Setting global CPU cgroup (if required)"); - if (virDomainCgroupSetupGlobalCpuCgroup(vm, - priv->cgroup) < 0) + if (virCHProcessSetup(vm) < 0) goto cleanup; =20 - VIR_DEBUG("Setting vCPU tuning/settings"); - if (virCHProcessSetupVcpus(vm) < 0) - goto cleanup; - - virCHProcessUpdateInfo(vm); virDomainObjSetState(vm, VIR_DOMAIN_RUNNING, reason); =20 return 0; --=20 2.34.1 _______________________________________________ Devel mailing list -- devel@lists.libvirt.org To unsubscribe send an email to devel-leave@lists.libvirt.org