From nobody Mon Feb 9 15:11:31 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=1695668526; cv=none; d=zohomail.com; s=zohoarc; b=MoBXeAb61OuL95r2rgqkF2nGWKA1gV5QnHfjAEL/JwiCLkWvz7hItS2bc6YthIcJKwOOmzJXjxRGw2bZbDLk/4DRayLZJbzNWkKcDKFmVltT90U9Ok7RMo/8W7nNhsv2jBDC69IDlIvExw/nOxLmx81tXaCay2nzZkaUCFEgDyY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1695668526; 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=V3vHKpIHi+3KkMNkG/+qoLaIAIvM1skv+/FaPgtpxCU=; b=hiYWf29u3H6JI/Mc0iYmDayeRDFF6nzy2qCjYvc4EDC74MIFrc62Vu9HKFQyUcd9la3RVMvJJdX+wlGuUfqmgpRIyyHPkbeWUEbqHcVSi4rFGmKLDvd9HurVnlyb3g1sxpKDT/WYcbsSHFCU4fja5W93xHZV9obf6M+k8XKH/AQ= 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 1695668526094793.9008728597158; Mon, 25 Sep 2023 12:02:06 -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-649-cagGCVHQPPiomlKYlm0heA-1; Mon, 25 Sep 2023 14:59:47 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 90F2C85829A; Mon, 25 Sep 2023 18:59:41 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 79F4E1054FC2; Mon, 25 Sep 2023 18:59:41 +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 CA6F119466EE; Mon, 25 Sep 2023 18:59:37 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 9D13F194658C for ; Mon, 25 Sep 2023 18:59:35 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 98309711286; Mon, 25 Sep 2023 18:59:35 +0000 (UTC) Received: from harajuku.usersys.redhat.com (unknown [10.45.226.198]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2A4EF711296 for ; Mon, 25 Sep 2023 18:59:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695668525; 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=V3vHKpIHi+3KkMNkG/+qoLaIAIvM1skv+/FaPgtpxCU=; b=bjp23XE0gdt8Z0zYDdGiFcp7gxQYDqLsWEqZOmYy8B9EYgzwmTtB640UmxmMLT5SXJLSxL lcg6bD/2Mp3rutmPXO1SHwMVn5n6vb9f1v75iJGNZi48uGMbs4rut/FSaNfunGBHJxlw1F whDBZpx1TeBvy8o2jC779z6RK5R4NK0= X-MC-Unique: cagGCVHQPPiomlKYlm0heA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 29/42] systemd: Switch virtqemud to common templates Date: Mon, 25 Sep 2023 20:58:27 +0200 Message-ID: <20230925185840.880191-30-abologna@redhat.com> In-Reply-To: <20230925185840.880191-1-abologna@redhat.com> References: <20230925185840.880191-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 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.3 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: 1695668527480100007 Content-Type: text/plain; charset="utf-8"; x-default="true" Signed-off-by: Andrea Bolognani --- src/qemu/meson.build | 33 +++++++++++++++++++++--- src/qemu/virtqemud.service.in | 48 ----------------------------------- 2 files changed, 29 insertions(+), 52 deletions(-) delete mode 100644 src/qemu/virtqemud.service.in diff --git a/src/qemu/meson.build b/src/qemu/meson.build index b52497bdf0..7e5db09e0c 100644 --- a/src/qemu/meson.build +++ b/src/qemu/meson.build @@ -183,11 +183,36 @@ if conf.has('WITH_QEMU') =20 virt_daemon_units +=3D { 'service': 'virtqemud', - 'service_in': files('virtqemud.service.in'), 'name': 'Libvirt qemu', - 'socket_in': libvirtd_socket_in, - 'socket_ro_in': libvirtd_socket_ro_in, - 'socket_admin_in': libvirtd_socket_admin_in, + 'service_unit_extra': [ + 'Requires=3Dvirtlogd.socket', + 'Wants=3Dvirtlockd.socket', + 'Wants=3Dsystemd-machined.service', + 'After=3Dsystemd-machined.service', + 'After=3Dremote-fs.target', + ], + 'service_service_extra': [ + 'KillMode=3Dprocess', + '# Raise hard limits to match behaviour of systemd >=3D 240.', + '# During startup, daemon will set soft limit to match hard limit', + '# per systemd recommendations', + 'LimitNOFILE=3D1024:524288', + '# The cgroups pids controller can limit the number of tasks started= by', + '# the daemon, which can limit the number of domains for some hyperv= isors.', + '# A conservative default of 8 tasks per guest results in a TasksMax= of', + '# 32k to support 4096 guests.', + 'TasksMax=3D32768', + '# With cgroups v2 there is no devices controller anymore, we have t= o use', + '# eBPF to control access to devices. In order to do that we create= a eBPF', + '# hash MAP which locks memory. The default map size for 64 devices= together', + '# with program takes 12k per guest. After rounding up we will get = 64M to', + '# support 4096 guests.', + 'LimitMEMLOCK=3D64M', + ], + 'service_install_extra': [ + 'Also=3Dvirtlogd.socket', + 'Also=3Dvirtlockd.socket', + ], } =20 openrc_init_files +=3D { diff --git a/src/qemu/virtqemud.service.in b/src/qemu/virtqemud.service.in deleted file mode 100644 index e79670ca95..0000000000 --- a/src/qemu/virtqemud.service.in +++ /dev/null @@ -1,48 +0,0 @@ -[Unit] -Description=3DVirtualization qemu daemon -Conflicts=3Dlibvirtd.service -Requires=3Dvirtlogd.socket -Requires=3Dvirtqemud.socket -Requires=3Dvirtqemud-ro.socket -Requires=3Dvirtqemud-admin.socket -Wants=3Dvirtlockd.socket -Wants=3Dsystemd-machined.service -After=3Dnetwork.target -After=3Ddbus.service -After=3Dapparmor.service -After=3Dremote-fs.target -After=3Dsystemd-machined.service -Documentation=3Dman:virtqemud(8) -Documentation=3Dhttps://libvirt.org - -[Service] -Type=3Dnotify -Environment=3DVIRTQEMUD_ARGS=3D"--timeout 120" -EnvironmentFile=3D-@initconfdir@/virtqemud -ExecStart=3D@sbindir@/virtqemud $VIRTQEMUD_ARGS -ExecReload=3D/bin/kill -HUP $MAINPID -KillMode=3Dprocess -Restart=3Don-failure -# Raise hard limits to match behaviour of systemd >=3D 240. -# During startup, daemon will set soft limit to match hard limit -# per systemd recommendations -LimitNOFILE=3D1024:524288 -# The cgroups pids controller can limit the number of tasks started by -# the daemon, which can limit the number of domains for some hypervisors. -# A conservative default of 8 tasks per guest results in a TasksMax of -# 32k to support 4096 guests. -TasksMax=3D32768 -# With cgroups v2 there is no devices controller anymore, we have to use -# eBPF to control access to devices. In order to do that we create a eBPF -# hash MAP which locks memory. The default map size for 64 devices togeth= er -# with program takes 12k per guest. After rounding up we will get 64M to -# support 4096 guests. -LimitMEMLOCK=3D64M - -[Install] -WantedBy=3Dmulti-user.target -Also=3Dvirtlogd.socket -Also=3Dvirtlockd.socket -Also=3Dvirtqemud.socket -Also=3Dvirtqemud-ro.socket -Also=3Dvirtqemud-admin.socket --=20 2.41.0