From nobody Sun Apr 28 22:42:21 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 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=1558520910; cv=none; d=zoho.com; s=zohoarc; b=FnQ9KES1bao+LW3Mckr//tQcH6c+dT0QNhhQH/dgVDOS4FZOEEXkL60WO2AA2dv2IYIAkt2EL7NhiFKx6dfJUVYvu1k9TMuIYGWAN9+BD1lJ9XA1Gwly79Bdbcdc0Ma+A1TWRbHj8ciu3F32CroJEGCbgPOp7nTlmY/XgMaXtnA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1558520910; 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:ARC-Authentication-Results; bh=RDn6GwHmp+tomDxFhNBF3+1t/wdXzqzK1vuK84xYdDI=; b=N7JVisKgBXn/X2PWKmncJTuVXZZk+uPMjlKPMxH+fKvKJ9usAxEtOHkPji25uTCyAHc+B3xWW8vjPAa+4Sa3y4rpsbpCtdZIbJGwJQcl0V6ZZtAoVwIpc4oLqq8RI7LWohx4GF84cDfmumRXIgu5wxwN41H+USMeDrDBxNZ1jjQ= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1558520910518406.96382765145756; Wed, 22 May 2019 03:28:30 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AF95B3084034; Wed, 22 May 2019 10:27:39 +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 CE387544EE; Wed, 22 May 2019 10:27:29 +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 5303854D3D; Wed, 22 May 2019 10:27:13 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x4MARA2d030948 for ; Wed, 22 May 2019 06:27:10 -0400 Received: by smtp.corp.redhat.com (Postfix) id 075F960478; Wed, 22 May 2019 10:27:10 +0000 (UTC) Received: from caroline (unknown [10.43.2.67]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D158060501 for ; Wed, 22 May 2019 10:27:05 +0000 (UTC) Received: from caroline.brq.redhat.com (caroline.usersys.redhat.com [127.0.0.1]) by caroline (Postfix) with ESMTP id 6DC141206BF for ; Wed, 22 May 2019 12:27:04 +0200 (CEST) From: Martin Kletzander To: libvir-list@redhat.com Date: Wed, 22 May 2019 12:27:03 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 1/2] qemu: Set emulator thread scheduler only after QEMU starts 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: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Wed, 22 May 2019 10:28:24 +0000 (UTC) Content-Type: text/plain; charset="utf-8" If the scheduler is set before vCPU0 cannot be moved into its cpu,cpuacct cgroup. While it is not yet known whether this is a bug or not, it makes s= ense for us to do that later as otherwise the scheduler would be inherited by vC= PU and I/O Threads even when they do not have any such setting specified. Signed-off-by: Martin Kletzander --- src/qemu/qemu_process.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 90466771cd87..fa5909e9bed3 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -2658,8 +2658,9 @@ qemuProcessSetupPid(virDomainObjPtr vm, if (use_cpumask && virProcessSetAffinity(pid, use_cpumask) < 0) goto cleanup; =20 - /* Set scheduler type and priority. */ + /* Set scheduler type and priority, but not for the main thread. */ if (sched && + nameval !=3D VIR_CGROUP_THREAD_EMULATOR && virProcessSetScheduler(pid, sched->policy, sched->priority) < 0) goto cleanup; =20 @@ -6773,6 +6774,13 @@ qemuProcessLaunch(virConnectPtr conn, if (qemuProcessSetupIOThreads(vm) < 0) goto cleanup; =20 + VIR_DEBUG("Setting emulator scheduler"); + if (vm->def->cputune.emulatorsched && + virProcessSetScheduler(vm->pid, + vm->def->cputune.emulatorsched->policy, + vm->def->cputune.emulatorsched->priority) <= 0) + goto cleanup; + VIR_DEBUG("Setting any required VM passwords"); if (qemuProcessInitPasswords(driver, vm, asyncJob) < 0) goto cleanup; --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun Apr 28 22:42:21 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 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=1558522286; cv=none; d=zoho.com; s=zohoarc; b=aaI5arLzYXw6ZBpSAwMOVfo8kNQpY9CCAYTd9L0GIVHOADZJzqDM3nY/p+31jh/DVctKCLD6jCawhc/Gp40sBx/jSeiFABfoJ8MT+5TZelc6TC/iRzlcyx0j8HbV8uSCvxQC5OdJuFtD6SV9ljyD5y+G1PGTiZV77mpALI2uLmE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1558522286; 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:ARC-Authentication-Results; bh=LaZ9sCNTqyOSLq2Obl2Ov1eH2cvfDyP5mgeZIY5I9SQ=; b=FbI3NaR80pTHpfIqErPTuvvk4j5PJtQ6wHiTaFv2DU4x+9wWStj3B+UPWxa5oEjyY+pi3uoYRZEQ6CCaKzdYlOtrnWFgUkvKjyOo5Xa/NveQq/9j3EzLXpw8voY6frIg8yYd4u8j6iKYUhGd35nsp7sGwJ4EBLmNlhl5tdLnwpU= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1558522286067371.31778199299424; Wed, 22 May 2019 03:51:26 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id C39A586676; Wed, 22 May 2019 10:51:11 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 98E141001E63; Wed, 22 May 2019 10:51:09 +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 4520F1806B15; Wed, 22 May 2019 10:51:05 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x4MAR7jD030930 for ; Wed, 22 May 2019 06:27:08 -0400 Received: by smtp.corp.redhat.com (Postfix) id EFD80604D7; Wed, 22 May 2019 10:27:07 +0000 (UTC) Received: from caroline (unknown [10.43.2.67]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C55A4604D8 for ; Wed, 22 May 2019 10:27:05 +0000 (UTC) Received: from caroline.brq.redhat.com (caroline.usersys.redhat.com [127.0.0.1]) by caroline (Postfix) with ESMTP id 73F011206C0 for ; Wed, 22 May 2019 12:27:04 +0200 (CEST) From: Martin Kletzander To: libvir-list@redhat.com Date: Wed, 22 May 2019 12:27:04 +0200 Message-Id: <99a92e5a11707da47285703a20a8ef3b8399b4ec.1558520817.git.mkletzan@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 2/2] docs: Add emulatorsched fix info to news.xml 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: , Content-Transfer-Encoding: quoted-printable 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-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Wed, 22 May 2019 10:51:15 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Signed-off-by: Martin Kletzander --- docs/news.xml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index 2ecb835e45f0..9922cd4de0e2 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -45,6 +45,18 @@
+ + + qemu: Fix emulator scheduler support + + + Setting the scheduler for QEMU's main thread before QEMU had a c= hance + to start up other threads was misleading as it would affect other + threads (vCPU and I/O) as well. In some particular situations t= his + could also lead to an error when the thread for vCPU #0 was being + moved to its cpu,cpuacct cgroup. This was fixed so that the sch= eduler for the main thread is set after QEMU starts. + +
--=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list