public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/systemd] rawhide: oomd-defaults: enable swap-based killing for user app.slice
@ 2026-11-24 17:55 Daranton
0 siblings, 0 replies; only message in thread
From: Daranton @ 2026-11-24 17:55 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/systemd
Branch : rawhide
Commit : e86ba73545754534889a8a57c490066b8fb32186
Author : Daranton <daranton.public@proton.me>
Date : 2026-11-23T21:03:46+00:00
Stats : +7/-0 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/systemd/c/e86ba73545754534889a8a57c490066b8fb32186?branch=rawhide
Log:
oomd-defaults: enable swap-based killing for user app.slice
Since 7665e1796f91 removed ManagedOOMSwap=kill from -.slice, no cgroup
is monitored for swap and SwapUsedLimit= is never used. On zram-only
desktops the memory pressure rule often doesn't trigger before the
session becomes unusable (rhbz#2248071, systemd#25596).
The removal was because the root-slice rule could pick GNOME Shell
(rhbz#1941170). Scope the swap rule to the user's app.slice only, so
session.slice and system.slice are never candidates.
---
diff --git a/10-oomd-app-slice-swap-defaults.conf b/10-oomd-app-slice-swap-defaults.conf
new file mode 100644
index 0000000..8e69623
--- /dev/null
+++ b/10-oomd-app-slice-swap-defaults.conf
@@ -0,0 +1,5 @@
+# Kill the app using the most swap when total swap use exceeds
+# SwapUsedLimit= (90% by default). Limited to app.slice so that
+# session.slice (GNOME Shell, etc.) is never a candidate.
+[Slice]
+ManagedOOMSwap=kill
diff --git a/systemd.spec b/systemd.spec
index 5516f50..ff11e29 100644
--- a/systemd.spec
+++ b/systemd.spec
@@ -141,6 +141,7 @@ Source24: sysusers.generate-pre.sh
Source25: 98-default-mac-none.link
Source26: systemd-user
+Source27: 10-oomd-app-slice-swap-defaults.conf
%if 0%{?fedora} < 40 && 0%{?rhel} < 10
# Work-around for dracut issue: run generators directly when we are in initrd
@@ -1191,6 +1192,7 @@ install -Dm0644 %{SOURCE13} %{buildroot}%{_prefix}/lib/systemd/.abignore
install -Dm0644 -t %{buildroot}%{_prefix}/lib/systemd/oomd.conf.d/ %{SOURCE14}
install -Dm0644 -t %{buildroot}%{system_unit_dir}/system.slice.d/ %{SOURCE15}
install -Dm0644 -t %{buildroot}%{user_unit_dir}/slice.d/ %{SOURCE15}
+install -Dm0644 -t %{buildroot}%{user_unit_dir}/app.slice.d/ %{SOURCE27}
%if 0%{?fedora}
# https://fedoraproject.org/wiki/Changes/Shorter_Shutdown_Timer
install -Dm0644 -t %{buildroot}%{system_unit_dir}/service.d/ %{SOURCE16}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-24 17:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-24 17:55 [rpms/systemd] rawhide: oomd-defaults: enable swap-based killing for user app.slice Daranton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox