From nobody Sun Feb 8 11:07:11 2026 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=1661331336; cv=none; d=zohomail.com; s=zohoarc; b=MIKauIhiq1aKZkjmPoQp5caSgOhzsTNr7VIHx0KsiYeEW5H+S9F3aUuoYZ8YRUm7rtj0cq3UPQGg4+PQRKZxYzmtebH4A9Ht32jJGi4eKAYFWhaAwGIlPIFRLuA0sXBMbIw4iHnrrm8ZVt3UYyQ/ENnrBNwq8WKH8CGkCDOSJM0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1661331336; 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=8cwt8xFWVHzPNLx9WuUasvTD0tM0REruaZ0aiijzfxU=; b=JJ/z8I5wf8IknR9xVWi/xjBY254vhAADVVQI3h4hGE3mG8k+nb8dzJrDxP0LktR8JZzhCycMpORWgXGRFk07wT5dpGaJB4bR5f1ZBQn7PpD6GY67jBxyDLHUbTsIgJm4XVWNP5Fdw9bqN/StA55P8OFQqZk5GAjCcy4TgCqYN9M= 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 1661331336393219.46331259687543; Wed, 24 Aug 2022 01:55:36 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-163-Nk6-ay9UN5Sr6tB5cRtkGA-1; Wed, 24 Aug 2022 04:55:31 -0400 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2F7B238008A8; Wed, 24 Aug 2022 08:55:29 +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 1D40E492C3B; Wed, 24 Aug 2022 08:55:29 +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 0FD8A1946A43; Wed, 24 Aug 2022 08:55:29 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id E05FA1946A5A for ; Wed, 24 Aug 2022 08:55:27 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id C29CF2026D07; Wed, 24 Aug 2022 08:55:27 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6C7B12026D64 for ; Wed, 24 Aug 2022 08:55:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1661331335; 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=8cwt8xFWVHzPNLx9WuUasvTD0tM0REruaZ0aiijzfxU=; b=ConuGgADTRgO/XUh8yQY/KLf6gWxns40KXCaOP/6h2nzeapyucvvy9k5MIGf0r37fCtNo4 rMDCkcztxf5A8KQpYle+SgJaQbkbaaXc1NkApvR5Yw/qu5m4Fe556UBeCfv4ZnvjPP+2lj kkvEii7OpGgA13UpW4bwfKLZEQWfFcY= X-MC-Unique: Nk6-ay9UN5Sr6tB5cRtkGA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH v4 5/8] qemu_process: Enable SCHED_CORE for QEMU process Date: Wed, 24 Aug 2022 10:55:10 +0200 Message-Id: <2da18136ec2f3a76127f172bb963f1ab82dbeaf2.1661331156.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 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.85 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1661331336707100001 For QEMU_SCHED_CORE_EMULATOR or QEMU_SCHED_CORE_FULL the QEMU process (and its vCPU threads) should be placed into its own scheduling group. Since we have the dummy process running for exactly this purpose use its PID as an argument to virCommandSetRunAmong(). Signed-off-by: Michal Privoznik Reviewed-by: Daniel P. Berrang=C3=A9 --- src/qemu/qemu_process.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index f40f9acc09..fa25207bfe 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -7557,6 +7557,9 @@ qemuProcessLaunch(virConnectPtr conn, virCommandSetMaxProcesses(cmd, cfg->maxProcesses); if (cfg->maxFiles > 0) virCommandSetMaxFiles(cmd, cfg->maxFiles); + if (cfg->schedCore =3D=3D QEMU_SCHED_CORE_EMULATOR || + cfg->schedCore =3D=3D QEMU_SCHED_CORE_FULL) + virCommandSetRunAmong(cmd, priv->schedCoreChildPID); =20 /* In this case, however, zero means that core dumps should be * disabled, and so we always need to set the limit explicitly */ --=20 2.35.1