From nobody Mon Feb 9 21:22:04 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=1696236703; cv=none; d=zohomail.com; s=zohoarc; b=CWdJEhCl4y8GjpY/Az1oXWKzVfKyL2IkR44DXPY7PorAbEixJFjCjNovloSqEBKRmXRen5aYUPhgGc/37IKm+A1LfI0CqeJCvwgBjox60ActWMFkAQzLfLpBEylWZnKwN9axdR1VriwPLuZ7cb2sl0m7fiRf/YSZVNc5PYNfENs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1696236703; 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=5sxmDyV07wYKa89QNQqywMDZ+mDpDeU6kn9hbyAWKMI=; b=XekYBQZkani0iHUA0WrnNxZKlNuPQcTRT69+TdTD4Ggc6E0OEnZzQsRl1IxIf75FoKALRfDruPwKNC4she32PopLuIccN5r6KG61Qfk5DPnMcZpof43wa+djpQKYmCVg5Y4lxe7iiQlawNWQE/x9DPmUWc8VdygUvaAJNO5cjWw= 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 169623670303151.88428818611544; Mon, 2 Oct 2023 01:51:43 -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-604-5zIRZ6-RMcebOG3p8Eg7gg-1; Mon, 02 Oct 2023 04:51:39 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (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 531BB811E86; Mon, 2 Oct 2023 08:51:35 +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 3F2382026D4B; Mon, 2 Oct 2023 08:51:35 +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 2FAC31946597; Mon, 2 Oct 2023 08:51:35 +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 6654C19465A3 for ; Mon, 2 Oct 2023 08:51:33 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 534E7C158BA; Mon, 2 Oct 2023 08:51:33 +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 DFE79C154CA 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=1696236702; 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=5sxmDyV07wYKa89QNQqywMDZ+mDpDeU6kn9hbyAWKMI=; b=G/IWndlPFJl8+0KTfWJV10qfXipzb+GrGxpwUPOmq2HTEN2pql0jcS82oPWhnbamJ3bJa/ BbvQCokBIGvLahWG0fnk/FFobajvs26y5XAJMXlLYgXwKpMSHWy+gsV8/V6jSlZEoOdexB fjEYx2dZP7qZh/Gs7bHMihIf4NsJ0lo= X-MC-Unique: 5zIRZ6-RMcebOG3p8Eg7gg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 07/11] systemd: Introduce systemd_service_oomscoreadjust_extra Date: Mon, 2 Oct 2023 10:51:22 +0200 Message-ID: <20231002085126.210149-8-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.4 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: 1696236704802100009 Content-Type: text/plain; charset="utf-8"; x-default="true" Signed-off-by: Andrea Bolognani --- src/locking/meson.build | 1 + src/locking/virtlockd.service.in | 4 ---- src/logging/meson.build | 1 + src/logging/virtlogd.service.in | 4 ---- src/meson.build | 1 + src/virtd.service.oomscoreadjust.extra.in | 5 +++++ 6 files changed, 8 insertions(+), 8 deletions(-) create mode 100644 src/virtd.service.oomscoreadjust.extra.in diff --git a/src/locking/meson.build b/src/locking/meson.build index f3bdf57483..d15e2cb84a 100644 --- a/src/locking/meson.build +++ b/src/locking/meson.build @@ -145,6 +145,7 @@ if conf.has('WITH_LIBVIRTD') 'service': 'virtlockd', 'service_in': files('virtlockd.service.in'), 'service_extra_in': [ + systemd_service_oomscoreadjust_extra_in, systemd_service_limitnofile_extra_in, ], 'name': 'locking', diff --git a/src/locking/virtlockd.service.in b/src/locking/virtlockd.servi= ce.in index 5c374fea8f..cd6c77c6af 100644 --- a/src/locking/virtlockd.service.in +++ b/src/locking/virtlockd.service.in @@ -13,10 +13,6 @@ Environment=3DVIRTLOCKD_ARGS=3D EnvironmentFile=3D-@initconfdir@/virtlockd ExecStart=3D@sbindir@/virtlockd $VIRTLOCKD_ARGS ExecReload=3D/bin/kill -USR1 $MAINPID -# Losing the locks is a really bad thing that will -# cause the machine to be fenced (rebooted), so make -# sure we discourage OOM killer -OOMScoreAdjust=3D-900 =20 [Install] WantedBy=3Dmulti-user.target diff --git a/src/logging/meson.build b/src/logging/meson.build index a3d0ad297c..fbf492b16e 100644 --- a/src/logging/meson.build +++ b/src/logging/meson.build @@ -92,6 +92,7 @@ if conf.has('WITH_LIBVIRTD') 'service': 'virtlogd', 'service_in': files('virtlogd.service.in'), 'service_extra_in': [ + systemd_service_oomscoreadjust_extra_in, systemd_service_limitnofile_extra_in, ], 'name': 'logging', diff --git a/src/logging/virtlogd.service.in b/src/logging/virtlogd.service= .in index 9108dd1ff9..569c9f88ad 100644 --- a/src/logging/virtlogd.service.in +++ b/src/logging/virtlogd.service.in @@ -13,10 +13,6 @@ Environment=3DVIRTLOGD_ARGS=3D EnvironmentFile=3D-@initconfdir@/virtlogd ExecStart=3D@sbindir@/virtlogd $VIRTLOGD_ARGS ExecReload=3D/bin/kill -USR1 $MAINPID -# Losing the logs is a really bad thing that will -# cause the machine to be fenced (rebooted), so make -# sure we discourage OOM killer -OOMScoreAdjust=3D-900 =20 [Install] WantedBy=3Dmulti-user.target diff --git a/src/meson.build b/src/meson.build index 611f05583d..29c37a030a 100644 --- a/src/meson.build +++ b/src/meson.build @@ -197,6 +197,7 @@ guest_unit_files =3D [] 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') +systemd_service_oomscoreadjust_extra_in =3D files('virtd.service.oomscorea= djust.extra.in') =20 # virt_daemon_units: # generate libvirt daemon systemd unit files diff --git a/src/virtd.service.oomscoreadjust.extra.in b/src/virtd.service.= oomscoreadjust.extra.in new file mode 100644 index 0000000000..53b93efda8 --- /dev/null +++ b/src/virtd.service.oomscoreadjust.extra.in @@ -0,0 +1,5 @@ +[Service] +# Losing this daemon is a really bad thing that will +# cause the machine to be fenced (rebooted), so make +# sure we discourage OOM killer +OOMScoreAdjust=3D-900 --=20 2.41.0