From nobody Tue Nov 26 12:47:41 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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.129.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=1686149072; cv=none; d=zohomail.com; s=zohoarc; b=iHTNRGpRAJ2xa8ZsBrjmFrFTjwTMA2ixXkD7C8wzm5Nkshh942qDsHmcqh9LAJlD3DGIf8PRizo+UykkQYvf/PGJSA9iCTkygdOoChA2zx9Q4Yb/hO/GQOTMPioySRXpdxjdwWXfLlqvLXTMWwLwsLSjGvTazxikdHnrKwI72Kc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1686149072; 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=TrrDRFbwXrIfq0XRUToQC/PVgXYc3JQ4Y5/opW2qmxo=; b=hN6HSLlKeG754zj5cAHNgeoQhvMJWxafLNGqBOkn8V0Xu8E/XRIHrBsgps7SD+BsdBYae+grujYlgeDEVrjVRAaHWnt9sBJxKEUs6CfPh0vHu8O97g7Vutsmqz1oDq9IFJ5T+kQ/3wzvDxV+eT1JFHduBTa+I3si+Uwol3WdXrk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.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.129.124]) by mx.zohomail.com with SMTPS id 1686149072644719.9895131828978; Wed, 7 Jun 2023 07:44:32 -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-635-e_wO5cs1OF6XKQ6h6tm8KA-1; Wed, 07 Jun 2023 10:44:26 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id CD55B811E91; Wed, 7 Jun 2023 14:44:20 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id BABD2140E955; Wed, 7 Jun 2023 14:44:20 +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 A4AE219451CE; Wed, 7 Jun 2023 14:44:17 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 1663119451D6 for ; Wed, 7 Jun 2023 14:41:05 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 6618E406793; Wed, 7 Jun 2023 14:41:05 +0000 (UTC) Received: from localhost.localdomain (unknown [10.43.2.36]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0E4FC40336F for ; Wed, 7 Jun 2023 14:41:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1686149071; 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=TrrDRFbwXrIfq0XRUToQC/PVgXYc3JQ4Y5/opW2qmxo=; b=WmlXcKaaEfKX6ktq/6jEkWRitfxcGc0PH/9DPa0I0TklDPH6VuZySOXEYq/Vn6/ir3t9FY pHPfUW2215eOCPm/lp2f4bs1bsnGyJth4ud6vgVyg5MKl/GQLkNboMH10S1ATYi5GNb6zJ Boe4NPqlLL5BGZ7p2KySFYxeAvqTFcs= X-MC-Unique: e_wO5cs1OF6XKQ6h6tm8KA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 3/3] qemu: Drop @unionMems argument from qemuProcessSetupPid() Date: Wed, 7 Jun 2023 16:41:01 +0200 Message-Id: <46d3480a14c858c2f33e4d3534e09eb72b010590.1686148404.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 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 3.1 on 10.11.54.7 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: 1686149073230100001 Content-Type: text/plain; charset="utf-8"; x-default="true" The @unionMems argument of qemuProcessSetupPid() function is not necessary really as all callers pass 'true'. Drop it. Signed-off-by: Michal Privoznik Reviewed-by: Martin Kletzander --- src/qemu/qemu_process.c | 31 +++++++++++-------------------- 1 file changed, 11 insertions(+), 20 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index d9269e37a1..74e85c8464 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -2550,8 +2550,7 @@ qemuProcessSetupPid(virDomainObj *vm, virBitmap *cpumask, unsigned long long period, long long quota, - virDomainThreadSchedParam *sched, - bool unionMems) + virDomainThreadSchedParam *sched) { qemuDomainObjPrivate *priv =3D vm->privateData; virDomainNuma *numatune =3D vm->def->numa; @@ -2591,21 +2590,16 @@ qemuProcessSetupPid(virDomainObj *vm, if (virCgroupHasController(priv->cgroup, VIR_CGROUP_CONTROLLER_CPU) || virCgroupHasController(priv->cgroup, VIR_CGROUP_CONTROLLER_CPUSET)= ) { =20 - if (virDomainNumatuneGetMode(numatune, -1, &mem_mode) =3D=3D 0 && - (mem_mode =3D=3D VIR_DOMAIN_NUMATUNE_MEM_STRICT || - mem_mode =3D=3D VIR_DOMAIN_NUMATUNE_MEM_RESTRICTIVE)) { - + if (virDomainNumatuneGetMode(numatune, -1, &mem_mode) =3D=3D 0) { /* QEMU allocates its memory from the emulator thread. Thus it * needs to access union of all host nodes configured. */ - if (unionMems && - mem_mode !=3D VIR_DOMAIN_NUMATUNE_MEM_RESTRICTIVE) { + if (mem_mode =3D=3D VIR_DOMAIN_NUMATUNE_MEM_STRICT) { qemuDomainNumatuneMaybeFormatNodesetUnion(vm, NULL, &mem_m= ask); - } else { - if (virDomainNumatuneMaybeFormatNodeset(numatune, - priv->autoNodeset, - &mem_mask, -1) < 0) - goto cleanup; - } + } else if (mem_mode =3D=3D VIR_DOMAIN_NUMATUNE_MEM_RESTRICTIVE= && + virDomainNumatuneMaybeFormatNodeset(numatune, + priv->autoNodes= et, + &mem_mask, -1) = < 0) + goto cleanup; } =20 /* For restrictive numatune mode we need to set cpuset.mems for vC= PU @@ -2705,8 +2699,7 @@ qemuProcessSetupEmulator(virDomainObj *vm) 0, vm->def->cputune.emulatorpin, vm->def->cputune.emulator_period, vm->def->cputune.emulator_quota, - vm->def->cputune.emulatorsched, - true); + vm->def->cputune.emulatorsched); } =20 =20 @@ -5909,8 +5902,7 @@ qemuProcessSetupVcpu(virDomainObj *vm, vcpuid, vcpu->cpumask, vm->def->cputune.period, vm->def->cputune.quota, - &vcpu->sched, - true) < 0) + &vcpu->sched) < 0) return -1; =20 if (schedCore && @@ -6065,8 +6057,7 @@ qemuProcessSetupIOThread(virDomainObj *vm, iothread->cpumask, vm->def->cputune.iothread_period, vm->def->cputune.iothread_quota, - &iothread->sched, - true); + &iothread->sched); } =20 =20 --=20 2.39.3