![]() Cgroups may be unnecessarily realized when they are not needed. This happens, e.g. for mount units parsed from /proc/$PID/mountinfo, check touch /run/ns_mount unshare -n sh -c "mount --bind /proc/self/ns/net /run/ns_mount" # no cgroup exists file /sys/fs/cgroup/system.slice/run-ns_mount.mount systemctl daemon-reload # the vain cgroup exists file /sys/fs/cgroup/system.slice/run-ns_mount.mount . (Such cgroups can account to a large number with many similar mounts.) The code already accounts for "lazy" realization (see various checks for Unit.cgroup_realized) but the unit_deserialize() in the reload/reexec path performs unconditional realization. Invalidate (and queue) the units for realization only if we know that they were already realized in the past. This is a safe thing to do even in the case the reload brings some new cgroup setting (controllers, BPF) because units that aren't realized will use the updated setting when the time for their realization comes. (It's not even needed to add a code comment because the current formulation suggests the changed behavior.) |
||
---|---|---|
.github | ||
.lgtm/cpp-queries | ||
.mkosi | ||
.semaphore | ||
catalog | ||
coccinelle | ||
docs | ||
factory/etc | ||
hwdb.d | ||
man | ||
mkosi.default.d | ||
modprobe.d | ||
network | ||
po | ||
presets | ||
rules.d | ||
shell-completion | ||
src | ||
sysctl.d | ||
sysusers.d | ||
test | ||
tmpfiles.d | ||
tools | ||
units | ||
xorg | ||
.clang-format | ||
.ctags | ||
.dir-locals.el | ||
.editorconfig | ||
.gitattributes | ||
.gitignore | ||
.lgtm.yml | ||
.mailmap | ||
.packit.yml | ||
.vimrc | ||
.ycm_extra_conf.py | ||
configure | ||
LICENSE.GPL2 | ||
LICENSE.LGPL2.1 | ||
Makefile | ||
meson.build | ||
meson_options.txt | ||
mkosi.build | ||
NEWS | ||
README | ||
README.md | ||
TODO |
System and Service Manager
Details
Most documentation is available on systemd's web site.
Assorted, older, general information about systemd can be found in the systemd Wiki.
Information about build requirements is provided in the README file.
Consult our NEWS file for information about what's new in the most recent systemd versions.
Please see the Code Map for information about this repository's layout and content.
Please see the Hacking guide for information on how to hack on systemd and test your modifications.
Please see our Contribution Guidelines for more information about filing GitHub Issues and posting GitHub Pull Requests.
When preparing patches for systemd, please follow our Coding Style Guidelines.
If you are looking for support, please contact our mailing list or join our IRC channel.
Stable branches with backported patches are available in the stable repo.