From nobody Tue Feb 10 01:35:43 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 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=1586208539; cv=none; d=zohomail.com; s=zohoarc; b=NZ05KXBzkOCgR1h1iJVsC1GV/rmwIEEb0I+vv1lk+s8E0cRyK5fHm/P94qnw+zDKXXKstDIcpEC02SZTdmXZb2Mc8BLRArAc6XLVFiBLjOCoBEk/GkBsRrK1pH6ZfKf3ERVFzuErz5kxfAdWqwrsSq5SNA03ZLY0IoiEzfydg+E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1586208539; h=Content-Type:Content-Transfer-Encoding:Cc: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=P7OqMm8pMG+1Djp+ZD+GyyJnJyfnlaQh1SsE57Vb0nI=; b=j04CNUalaSrP+Hq8CNBfY1rJebvF1lxommAixvIWeq6B5Ij5UO9mp3zMNbjnPZiLjLZL79+l/NCWyi0/YX5AJ1G676woJYlPT9FnenFthq1kjgUneZ2TaM2vDahLAIDodhj1uzr6+REhCaxewEDGXRR2+UCTIxjxlDQgfgX9Seg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1586208539400752.9394220013476; Mon, 6 Apr 2020 14:28:59 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-469-1lNGYR77OCOBNq8O7Doq4g-1; Mon, 06 Apr 2020 17:28:55 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6FC20800D53; Mon, 6 Apr 2020 21:28:50 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 407061000325; Mon, 6 Apr 2020 21:28:50 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id E255693A71; Mon, 6 Apr 2020 21:28:49 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 036LSnvd015894 for ; Mon, 6 Apr 2020 17:28:49 -0400 Received: by smtp.corp.redhat.com (Postfix) id 237A29D348; Mon, 6 Apr 2020 21:28:49 +0000 (UTC) Received: from localhost (unknown [10.36.110.72]) by smtp.corp.redhat.com (Postfix) with ESMTP id D69129D378; Mon, 6 Apr 2020 21:28:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1586208538; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=P7OqMm8pMG+1Djp+ZD+GyyJnJyfnlaQh1SsE57Vb0nI=; b=UaJpp1tv10WhQ15mCHvClRZDhmjJfc1D9FlKnhxhJ5vxYHDDYx6AcVG5TY9C6QRx/QDPL4 Jrdf3kMZKgkfQdF+P2U/VDx2X85ewGwWmLP5PvzF+c9S58N1hjTTf1fO0QrOoWFJLkTB4Q p8m5ehiMXa/JfgzR2eB6UwWOhEoiSIQ= X-MC-Unique: 1lNGYR77OCOBNq8O7Doq4g-1 From: marcandre.lureau@redhat.com To: libvir-list@redhat.com Subject: [libvirt PATCH 14/15] qemu: create cgroup regardless of controller support Date: Mon, 6 Apr 2020 23:27:11 +0200 Message-Id: <20200406212712.1315604-15-marcandre.lureau@redhat.com> In-Reply-To: <20200406212712.1315604-1-marcandre.lureau@redhat.com> References: <20200406212712.1315604-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , phrdina@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" From: Marc-Andr=C3=A9 Lureau This allow for basic process management, at least. Signed-off-by: Marc-Andr=C3=A9 Lureau --- src/qemu/qemu_process.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 6b9f6fb860..0c33eab26c 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -2674,6 +2674,9 @@ qemuProcessSetupPid(virDomainObjPtr vm, afinity_cpumask =3D hostcpumap; } =20 + if (priv->cgroup && virCgroupNewThread(priv->cgroup, nameval, id, true= , &cgroup) < 0) + goto cleanup; + /* * If CPU cgroup controller is not initialized here, then we need * neither period nor quota settings. And if CPUSET controller is @@ -2689,9 +2692,6 @@ qemuProcessSetupPid(virDomainObjPtr vm, &mem_mask, -1) < 0) goto cleanup; =20 - if (virCgroupNewThread(priv->cgroup, nameval, id, true, &cgroup) <= 0) - goto cleanup; - if (virCgroupHasController(priv->cgroup, VIR_CGROUP_CONTROLLER_CPU= SET)) { if (use_cpumask && qemuSetupCgroupCpusetCpus(cgroup, use_cpumask) < 0) --=20 2.26.0.rc2.42.g98cedd0233