# Backstop for allocations that reach neither agent.slice nor build.slice, which is how
# 38G once escaped every ceiling. The system manager owns this, so a `systemctl --user
# daemon-reload` unregisters it until the next system reload — the slice drop-ins carry
# the durable guarantee and this only widens the net when it happens to be armed.
#
# The limit is deliberately far above the slice limits: this cgroup contains the desktop
# session, so anything lower kills the user's own applications rather than a runaway.
#
# Swap fullness is not a signal here: zram is priority-100 swap, so a full swap is the
# normal steady state and its victim is whichever cgroup holds the most cold pages —
# always a long-lived agent or terminal session. It cannot be made safe by marking the
# owner's cgroups omit either: on the swap-usage path oomd honours that mark only on
# root-owned cgroups, and every cgroup below user@1000.service is uid 1000.
#
# The pressure limit stays armed because that mark IS honoured on the pressure path when
# candidate and monitored ancestor share an owner, which they do here — so this backstop
# can only ever select agent.slice or build.slice, never the desktop (app.slice.d/50-oomd-omit.conf).
[Service]
ManagedOOMSwap=auto
ManagedOOMMemoryPressure=kill
ManagedOOMMemoryPressureLimit=80%
