Systemd/src/core
Michal Sekletár d9e45bc3ab core: introduce support for cgroup freezer
With cgroup v2 the cgroup freezer is implemented as a cgroup
attribute called cgroup.freeze. cgroup can be frozen by writing "1"
to the file and kernel will send us a notification through
"cgroup.events" after the operation is finished and processes in the
cgroup entered quiescent state, i.e. they are not scheduled to
run. Writing "0" to the attribute file does the inverse and process
execution is resumed.

This commit exposes above low-level functionality through systemd's DBus
API. Each unit type must provide specialized implementation for these
methods, otherwise, we return an error. So far only service, scope, and
slice unit types provide the support. It is possible to check if a
given unit has the support using CanFreeze() DBus property.

Note that DBus API has a synchronous behavior and we dispatch the reply
to freeze/thaw requests only after the kernel has notified us that
requested operation was completed.
2020-04-30 19:02:51 +02:00
..
all-units.h core: add spdx header to all-units.h 2019-07-24 05:06:21 +09:00
audit-fd.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
audit-fd.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
automount.c core: clearly refuse OnFailure= deps on units that can't fail 2020-01-09 11:03:53 +01:00
automount.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
bpf-devices.c bpf-devices: line-break some overly long function signatures 2020-01-07 18:41:36 +01:00
bpf-devices.h bpf: make bpf_devices_apply_policy() independent of any unit code 2019-11-11 14:55:57 +01:00
bpf-firewall.c core: constify bpf program arrays 2019-11-10 23:22:14 +01:00
bpf-firewall.h bpf-firewall: custom BPF programs through IP(Ingress|Egress)FilterPath= 2019-06-25 09:56:16 +02:00
cgroup.c core: introduce support for cgroup freezer 2020-04-30 19:02:51 +02:00
cgroup.h core: introduce support for cgroup freezer 2020-04-30 19:02:51 +02:00
core-varlink.c core: reduce indentation a bit 2020-01-17 08:13:09 +01:00
core-varlink.h core: add user/group resolution varlink interface to PID 1 2020-01-15 15:28:55 +01:00
dbus-automount.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
dbus-automount.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
dbus-cgroup.c core: write cgroup limits as permilles 2019-11-14 18:41:54 +01:00
dbus-cgroup.h core: make TasksMax a partially dynamic property 2019-11-14 18:41:54 +01:00
dbus-device.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
dbus-device.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
dbus-execute.c Merge pull request #15352 from poettering/user-group-name-valdity-rework 2020-04-09 18:49:22 +02:00
dbus-execute.h core: add ExecStartXYZEx= with dbus support for executable prefixes 2019-05-30 20:41:42 -07:00
dbus-job.c manager: add dbus parameter names 2020-04-16 19:46:40 +02:00
dbus-job.h core: add helper function to check job status 2019-10-01 15:05:27 +02:00
dbus-kill.c core: add support for RestartKillSignal= to override signal used for restart jobs 2019-10-02 14:01:25 +02:00
dbus-kill.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
dbus-manager.c core: introduce support for cgroup freezer 2020-04-30 19:02:51 +02:00
dbus-manager.h core: implement generic log control API in PID1 too 2020-04-21 17:08:23 +02:00
dbus-mount.c cgroup: drastically simplify caching of cgroups members mask 2018-11-23 13:41:37 +01:00
dbus-mount.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
dbus-path.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
dbus-path.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
dbus-scope.c scope: Support RuntimeMaxSec= directive in scope units 2019-10-28 09:44:31 +01:00
dbus-scope.h pid1: add a new AbandonScope() method call on the Manager object 2018-11-09 17:08:59 +01:00
dbus-service.c pid1: make TimeoutAbortSec settable for transient units 2019-11-27 13:56:29 +01:00
dbus-service.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
dbus-slice.c cgroup: drastically simplify caching of cgroups members mask 2018-11-23 13:41:37 +01:00
dbus-slice.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
dbus-socket.c user-util: rework how we validate user names 2020-04-08 17:11:20 +02:00
dbus-socket.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
dbus-swap.c core: expose swap priority value via dbus only if it is set 2020-01-09 17:08:10 +01:00
dbus-swap.h tree-wide: beautify remaining copyright statements 2018-06-14 10:20:21 +02:00
dbus-target.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
dbus-target.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
dbus-timer.c core: TAKE_PTR in timer_add_one_calendar_spec 2019-08-22 11:02:56 +02:00
dbus-timer.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
dbus-unit.c core: introduce support for cgroup freezer 2020-04-30 19:02:51 +02:00
dbus-unit.h core: introduce support for cgroup freezer 2020-04-30 19:02:51 +02:00
dbus-util.c user-util: rework how we validate user names 2020-04-08 17:11:20 +02:00
dbus-util.h user-util: rework how we validate user names 2020-04-08 17:11:20 +02:00
dbus.c core: introduce support for cgroup freezer 2020-04-30 19:02:51 +02:00
dbus.h core: drop initial ListNames() bus call from PID 1 2020-01-06 15:21:47 +01:00
device.c device: don't emit PropetiesChanged needlessly 2020-03-28 21:26:40 +01:00
device.h device: clean up DeviceFound flags set 2018-10-09 21:11:22 +02:00
dynamic-user.c user-util: rework how we validate user names 2020-04-08 17:11:20 +02:00
dynamic-user.h tree-wide: reorder various structures to make them smaller and use fewer cache lines 2019-03-27 18:11:11 +01:00
efi-random.c core: take random seed from boot loader and credit it to kernel entropy pool 2019-07-25 18:16:46 +02:00
efi-random.h core: take random seed from boot loader and credit it to kernel entropy pool 2019-07-25 18:16:46 +02:00
emergency-action.c core: add new API for enqueing a job with returning the transaction data 2019-03-27 12:37:37 +01:00
emergency-action.h core: change emergency_action() to return void 2019-03-18 16:06:36 +01:00
execute.c core: fix unused variable warning when !HAVE_SECCOMP 2020-04-23 14:42:09 +02:00
execute.h manager: add CoredumpFilter= setting 2020-04-09 14:08:48 +02:00
generator-setup.c Split out generator directory setup to a src/core/generator-setup.c 2020-03-27 20:12:44 +01:00
generator-setup.h Split out generator directory setup to a src/core/generator-setup.c 2020-03-27 20:12:44 +01:00
hostname-setup.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
hostname-setup.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
ima-setup.c headers: remove unneeded includes from util.h 2019-03-27 11:53:12 +01:00
ima-setup.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
ip-address-access.c bpf-firewall: optimization for IPAddressXYZ="any" (and unprivileged users) 2019-06-22 19:56:06 +02:00
ip-address-access.h bpf-firewall: optimization for IPAddressXYZ="any" (and unprivileged users) 2019-06-22 19:56:06 +02:00
job.c core: add debug log when a job in the activation queue is not runnable 2020-04-22 09:58:12 +01:00
job.h job: Don't mark as redundant if deps are relevant 2020-01-03 15:58:10 +01:00
kill.c core: add support for RestartKillSignal= to override signal used for restart jobs 2019-10-02 14:01:25 +02:00
kill.h core: add support for RestartKillSignal= to override signal used for restart jobs 2019-10-02 14:01:25 +02:00
killall.c killall: update reference to root storage daemon interface docs 2020-01-13 18:53:46 +01:00
killall.h core/killall: Propagate errors and return the number of process left 2019-04-08 19:41:16 +02:00
kmod-setup.c tree-wide: drop libkmod.h when module-util.h is included 2019-11-04 00:30:32 +09:00
kmod-setup.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
load-dropin.c core,install: allow one more case of "instance propagation" 2020-01-10 14:31:01 +01:00
load-dropin.h pid1: kill unit_file_find_dropin_paths() helper 2019-07-17 14:27:23 +02:00
load-fragment-gperf-nulstr.awk
load-fragment-gperf.gperf.m4 manager: add CoredumpFilter= setting 2020-04-09 14:08:48 +02:00
load-fragment.c Merge pull request #15352 from poettering/user-group-name-valdity-rework 2020-04-09 18:49:22 +02:00
load-fragment.h manager: add CoredumpFilter= setting 2020-04-09 14:08:48 +02:00
locale-setup.c tree-wide: drop string.h when string-util.h or friends are included 2019-11-04 00:30:32 +09:00
locale-setup.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
loopback-setup.c tree-wide: drop missing.h 2019-10-31 17:57:03 +09:00
loopback-setup.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
machine-id-setup.c Generate stable machine-id and DHCP client ID on POWER KVM. 2019-08-31 10:57:16 +02:00
machine-id-setup.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
macros.systemd.in rpm: avoid hiding errors from systemd commands 2019-03-22 20:54:59 +01:00
main.c main: bump RLIMIT_MEMLOCK by physical RAM size 2020-04-28 19:54:21 +02:00
manager.c tree-wide: use recvmsg_safe() at various places 2020-04-23 09:41:47 +02:00
manager.h pid1: when showing error status, do not switch to status=temporary 2020-03-01 11:42:42 +01:00
meson.build Split out generator directory setup to a src/core/generator-setup.c 2020-03-27 20:12:44 +01:00
mount-setup.c mount-setup: change the system mount propagation to shared by default only at bootup 2020-04-09 10:14:20 +02:00
mount-setup.h mount-setup: change the system mount propagation to shared by default only at bootup 2020-04-09 10:14:20 +02:00
mount.c core: add implicit ordering dep on blockdev@.target from all mount units 2020-01-21 20:23:44 +01:00
mount.h core/mount: support "systemctl clean" for mount units 2019-08-28 23:09:54 +09:00
namespace.c sd-bus: work around ubsan warning 2020-04-23 08:54:30 +02:00
namespace.h core: add new LogNamespace= execution setting 2020-01-31 15:01:43 +01:00
org.freedesktop.systemd1.conf
org.freedesktop.systemd1.policy.in
org.freedesktop.systemd1.service Revert "Drop dbus activation stub service" 2019-12-20 17:28:12 +01:00
path.c core: clearly refuse OnFailure= deps on units that can't fail 2020-01-09 11:03:53 +01:00
path.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
scope.c core: introduce support for cgroup freezer 2020-04-30 19:02:51 +02:00
scope.h scope: Support RuntimeMaxSec= directive in scope units 2019-10-28 09:44:31 +01:00
selinux-access.c selinux: print enforcing state in access check debug message 2020-03-27 20:54:58 +01:00
selinux-access.h selinux: do preprocessor check only in selinux-access.c 2020-04-29 13:56:40 +02:00
selinux-setup.c headers: remove unneeded includes from util.h 2019-03-27 11:53:12 +01:00
selinux-setup.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
service.c core: introduce support for cgroup freezer 2020-04-30 19:02:51 +02:00
service.h core: move timeout_clean_usec from Service to ExecContext 2019-08-28 23:09:54 +09:00
show-status.c pid1: add new mode systemd.show-status=error and use it when 'quiet' is passed 2020-03-01 11:48:23 +01:00
show-status.h pid1: add new mode systemd.show-status=error and use it when 'quiet' is passed 2020-03-01 11:48:23 +01:00
slice.c core: introduce support for cgroup freezer 2020-04-30 19:02:51 +02:00
slice.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
smack-setup.c tree-wide: drop dirent.h when dirent-util.h is included 2019-11-04 00:30:32 +09:00
smack-setup.h tree-wide: use proper unicode © instead of (C) where we can 2018-06-14 10:20:20 +02:00
socket.c Merge pull request #14505 from poettering/refuse-on-failure 2020-01-14 14:19:04 +01:00
socket.h core/socket: support "systemctl clean" for socket units 2019-08-28 23:09:54 +09:00
swap.c swap: check p->what for NULL 2020-03-23 08:30:32 +01:00
swap.h core: swap priority can be negative 2019-12-04 08:57:08 +01:00
system.conf.in log: add support for prefixing console log messages with current timestamp 2020-02-10 07:01:30 -05:00
systemd.pc.in tree-wide: spellcheck using codespell 2020-04-16 18:00:40 +02:00
target.c core: adjust load functions for other unit types to be more like service 2019-10-11 13:46:05 +02:00
target.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
timer.c core: clearly refuse OnFailure= deps on units that can't fail 2020-01-09 11:03:53 +01:00
timer.h core: optionally, trigger .timer units on timezone and clock changes 2019-04-02 08:20:10 +02:00
transaction.c Remove unneded {}s 2020-04-13 09:31:49 +02:00
transaction.h core: Add triggering job mode 2019-11-05 11:17:38 -08:00
triggers.systemd.in Drop my copyright headers 2018-06-14 13:03:20 +02:00
unit-printf.c tree-wide: support a bunch of additional specifiers 2020-04-28 22:47:21 +02:00
unit-printf.h core: mark unit_*_printf() functions as taking a const Unit* 2019-10-16 16:21:56 +02:00
unit.c core: introduce support for cgroup freezer 2020-04-30 19:02:51 +02:00
unit.h core: introduce support for cgroup freezer 2020-04-30 19:02:51 +02:00
user.conf.in log: add support for prefixing console log messages with current timestamp 2020-02-10 07:01:30 -05:00