From nobody Mon Feb 9 22:18:45 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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.133.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=1696236718; cv=none; d=zohomail.com; s=zohoarc; b=icq62SBXdbKEBv9porIZA8gvEzomacXfNMUj9vty0HUpIJjlmI+QjYJQdBP/NgQXVxmHYseoyOPgVqJrnAwD9zy5Q+YUS3nkfsc8dqSjzrkXmlupw5K6AeVwCyjkxZoOx9l5zQG9KKKEPuY/YNxZ4UKiAp+/TFlByTCOZwuCnsg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1696236718; 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=TnQC3SnPLwXo/NSQQCvMHfZZ3Q957IfCp7A4jUk6q9M=; b=cmm7WyGIRBUTO3GY/5C6I8vZNBBM4R5HgWmx2uviun64obvMR3C3gV2XG57gS/pEhM75St+IJJuW2SRNi9rygQTFpeATVYxqIUGkoMaXeSUlKa3yXCTs1RgsAm81Dowjm4gCjLv2E1P+gCf94PvZAir+uw77Pgp4nDCJjtW0CYA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.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.133.124]) by mx.zohomail.com with SMTPS id 1696236718259235.21707272763024; Mon, 2 Oct 2023 01:51:58 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx-ext.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-596-ZbKXjSF1MQGZS3-Hd_t1FA-1; Mon, 02 Oct 2023 04:51:38 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (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 3D2C11C294A8; Mon, 2 Oct 2023 08:51:34 +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 2677651E3; Mon, 2 Oct 2023 08:51:34 +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 F3BD71946597; Mon, 2 Oct 2023 08:51:33 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id A9EFB1946A47 for ; Mon, 2 Oct 2023 08:51:32 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 9DD5FC15BB8; Mon, 2 Oct 2023 08:51:32 +0000 (UTC) Received: from harajuku.usersys.redhat.com.homenet.telecomitalia.it (unknown [10.45.226.74]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 361C6C154CA for ; Mon, 2 Oct 2023 08:51:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1696236717; 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=TnQC3SnPLwXo/NSQQCvMHfZZ3Q957IfCp7A4jUk6q9M=; b=EEVwD4fGC6lhIEo+UdVze5MCVUJGGVjT3Cu3tNvZhNBREHWeGZG58xtscSnpAu6dx8ec+I KKE0F34SbgnRC+GeAZ/mVvKoWarAcrZTO11TGwr8U4SUlHSDM2fxHke1m/yUltavP4T5AZ zoMgd1G4OETkZfHea8rwU1cIIz75Paw= X-MC-Unique: ZbKXjSF1MQGZS3-Hd_t1FA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 06/11] systemd: Introduce systemd_service_limitmemlock_extra Date: Mon, 2 Oct 2023 10:51:21 +0200 Message-ID: <20231002085126.210149-7-abologna@redhat.com> In-Reply-To: <20231002085126.210149-1-abologna@redhat.com> References: <20231002085126.210149-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 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.5 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: 1696236719070100001 Content-Type: text/plain; charset="utf-8"; x-default="true" Signed-off-by: Andrea Bolognani --- src/ch/meson.build | 1 + src/ch/virtchd.service.extra.in | 6 ------ src/lxc/meson.build | 1 + src/lxc/virtlxcd.service.extra.in | 6 ------ src/meson.build | 1 + src/qemu/meson.build | 1 + src/qemu/virtqemud.service.extra.in | 6 ------ src/remote/libvirtd.service.in | 6 ------ src/remote/meson.build | 1 + ...service.extra.in =3D> virtd.service.limitmemlock.extra.in} | 6 ------ 10 files changed, 5 insertions(+), 30 deletions(-) copy src/{ch/virtchd.service.extra.in =3D> virtd.service.limitmemlock.extr= a.in} (75%) diff --git a/src/ch/meson.build b/src/ch/meson.build index 9eecf8c27f..29e76b6938 100644 --- a/src/ch/meson.build +++ b/src/ch/meson.build @@ -62,6 +62,7 @@ if conf.has('WITH_CH') files('virtchd.service.extra.in'), systemd_service_limitnofile_extra_in, systemd_service_taskmax_extra_in, + systemd_service_limitmemlock_extra_in, ], } =20 diff --git a/src/ch/virtchd.service.extra.in b/src/ch/virtchd.service.extra= .in index 38d820c1af..3655c51130 100644 --- a/src/ch/virtchd.service.extra.in +++ b/src/ch/virtchd.service.extra.in @@ -5,9 +5,3 @@ After=3Dremote-fs.target =20 [Service] KillMode=3Dprocess -# 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 together -# with program takes 12k per guest. After rounding up we will get 64M to -# support 4096 guests. -LimitMEMLOCK=3D64M diff --git a/src/lxc/meson.build b/src/lxc/meson.build index fb1aedb5fc..044a38c918 100644 --- a/src/lxc/meson.build +++ b/src/lxc/meson.build @@ -169,6 +169,7 @@ if conf.has('WITH_LXC') files('virtlxcd.service.extra.in'), systemd_service_limitnofile_extra_in, systemd_service_taskmax_extra_in, + systemd_service_limitmemlock_extra_in, ], } =20 diff --git a/src/lxc/virtlxcd.service.extra.in b/src/lxc/virtlxcd.service.e= xtra.in index 38d820c1af..3655c51130 100644 --- a/src/lxc/virtlxcd.service.extra.in +++ b/src/lxc/virtlxcd.service.extra.in @@ -5,9 +5,3 @@ After=3Dremote-fs.target =20 [Service] KillMode=3Dprocess -# 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 together -# with program takes 12k per guest. After rounding up we will get 64M to -# support 4096 guests. -LimitMEMLOCK=3D64M diff --git a/src/meson.build b/src/meson.build index 37239fd969..611f05583d 100644 --- a/src/meson.build +++ b/src/meson.build @@ -196,6 +196,7 @@ guest_unit_files =3D [] # can be used in service_extra_in/socket_extra_in (see below) systemd_service_limitnofile_extra_in =3D files('virtd.service.limitnofile.= extra.in') systemd_service_taskmax_extra_in =3D files('virtd.service.tasksmax.extra.i= n') +systemd_service_limitmemlock_extra_in =3D files('virtd.service.limitmemloc= k.extra.in') =20 # virt_daemon_units: # generate libvirt daemon systemd unit files diff --git a/src/qemu/meson.build b/src/qemu/meson.build index b28089aa06..167ed849ea 100644 --- a/src/qemu/meson.build +++ b/src/qemu/meson.build @@ -188,6 +188,7 @@ if conf.has('WITH_QEMU') files('virtqemud.service.extra.in'), systemd_service_limitnofile_extra_in, systemd_service_taskmax_extra_in, + systemd_service_limitmemlock_extra_in, ], } =20 diff --git a/src/qemu/virtqemud.service.extra.in b/src/qemu/virtqemud.servi= ce.extra.in index 164f672c08..32aba8be9c 100644 --- a/src/qemu/virtqemud.service.extra.in +++ b/src/qemu/virtqemud.service.extra.in @@ -9,12 +9,6 @@ After=3Dremote-fs.target =20 [Service] KillMode=3Dprocess -# 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 together -# with program takes 12k per guest. After rounding up we will get 64M to -# support 4096 guests. -LimitMEMLOCK=3D64M =20 [Install] Also=3Dvirtlogd.socket diff --git a/src/remote/libvirtd.service.in b/src/remote/libvirtd.service.in index 900b734f82..250b4a6fc3 100644 --- a/src/remote/libvirtd.service.in +++ b/src/remote/libvirtd.service.in @@ -33,12 +33,6 @@ ExecStart=3D@sbindir@/libvirtd $LIBVIRTD_ARGS ExecReload=3D/bin/kill -HUP $MAINPID KillMode=3Dprocess Restart=3Don-failure -# 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 =20 [Install] WantedBy=3Dmulti-user.target diff --git a/src/remote/meson.build b/src/remote/meson.build index 898131424f..8b81a813f2 100644 --- a/src/remote/meson.build +++ b/src/remote/meson.build @@ -194,6 +194,7 @@ if conf.has('WITH_REMOTE') 'service_extra_in': [ systemd_service_limitnofile_extra_in, systemd_service_taskmax_extra_in, + systemd_service_limitmemlock_extra_in, ], 'name': 'legacy monolithic', 'sockets': [ 'main', 'ro', 'admin', 'tcp', 'tls' ], diff --git a/src/ch/virtchd.service.extra.in b/src/virtd.service.limitmemlo= ck.extra.in similarity index 75% copy from src/ch/virtchd.service.extra.in copy to src/virtd.service.limitmemlock.extra.in index 38d820c1af..3534b5ea48 100644 --- a/src/ch/virtchd.service.extra.in +++ b/src/virtd.service.limitmemlock.extra.in @@ -1,10 +1,4 @@ -[Unit] -Wants=3Dsystemd-machined.service -After=3Dsystemd-machined.service -After=3Dremote-fs.target - [Service] -KillMode=3Dprocess # 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 together --=20 2.41.0