Ninjatrappeur's systemd working tree
Go to file
Chris Down c52db42b78 cgroup: Implement default propagation of MemoryLow with DefaultMemoryLow
In cgroup v2 we have protection tunables -- currently MemoryLow and
MemoryMin (there will be more in future for other resources, too). The
design of these protection tunables requires not only intermediate
cgroups to propagate protections, but also the units at the leaf of that
resource's operation to accept it (by setting MemoryLow or MemoryMin).

This makes sense from an low-level API design perspective, but it's a
good idea to also have a higher-level abstraction that can, by default,
propagate these resources to children recursively. In this patch, this
happens by having descendants set memory.low to N if their ancestor has
DefaultMemoryLow=N -- assuming they don't set a separate MemoryLow
value.

Any affected unit can opt out of this propagation by manually setting
`MemoryLow` to some value in its unit configuration. A unit can also
stop further propagation by setting `DefaultMemoryLow=` with no
argument. This removes further propagation in the subtree, but has no
effect on the unit itself (for that, use `MemoryLow=0`).

Our use case in production is simplifying the configuration of machines
which heavily rely on memory protection tunables, but currently require
tweaking a huge number of unit files to make that a reality. This
directive makes that significantly less fragile, and decreases the risk
of misconfiguration.

After this patch is merged, I will implement DefaultMemoryMin= using the
same principles.
2019-04-12 17:23:58 +02:00
.github/ISSUE_TEMPLATE docs: move markdown docs from .github/ to docs/ 2018-09-08 13:39:03 -07:00
.lgtm/cpp-queries lgtm: complain about accept() [people should use accept4() instead, due to O_CLOEXEC] 2019-04-10 20:03:38 +02:00
.mkosi mkosi: (Archlinux) increase the size of root partition. 2019-02-22 19:53:27 +09:00
catalog catalog: add a new catalog entry explaining the new OOM killer event log msg 2019-04-09 11:17:58 +02:00
coccinelle Merge pull request #12217 from keszybz/unlocked-operations 2019-04-12 13:51:53 +02:00
docs cgroup: Implement default propagation of MemoryLow with DefaultMemoryLow 2019-04-12 17:23:58 +02:00
factory/etc man,factory: update factory config for nsswitch.conf to match the man pages 2018-11-27 22:35:02 +01:00
hwdb hwdb: mark Apple Magic Trackpads as external 2019-04-11 18:27:01 +02:00
man cgroup: Implement default propagation of MemoryLow with DefaultMemoryLow 2019-04-12 17:23:58 +02:00
modprobe.d Add SPDX license headers to various assorted files 2017-11-19 19:08:15 +01:00
network link-config: add "keep" policy and use it by default 2019-01-17 13:56:02 +01:00
po l10n: Updated Lithuanian translation 2019-04-09 09:00:16 +02:00
presets Drop my copyright headers 2018-06-14 13:03:20 +02:00
rules units: add usb-gadget target 2019-02-15 18:16:27 +01:00
semaphoreci scripts: use 4 space indentation 2019-04-12 08:30:31 +02:00
shell-completion shell-completion/zsh: add -*type*- headers 2019-04-12 08:36:18 +02:00
src cgroup: Implement default propagation of MemoryLow with DefaultMemoryLow 2019-04-12 17:23:58 +02:00
sysctl.d sysctl: let's by default increase the numeric PID range from 2^16 to 2^22 2019-04-09 11:22:52 +02:00
sysusers.d sysusers,tmpfiles: re-create systemd-network, systemd-resolve and systemd-timesync 2018-07-16 17:11:50 +02:00
test cgroup: Implement default propagation of MemoryLow with DefaultMemoryLow 2019-04-12 17:23:58 +02:00
tmpfiles.d sysusers,tmpfiles: re-create systemd-network, systemd-resolve and systemd-timesync 2018-07-16 17:11:50 +02:00
tools scripts: use 4 space indentation 2019-04-12 08:30:31 +02:00
travis-ci scripts: use 4 space indentation 2019-04-12 08:30:31 +02:00
units scripts: use 4 space indentation 2019-04-12 08:30:31 +02:00
xorg scripts: use 4 space indentation 2019-04-12 08:30:31 +02:00
.ctags editors: Prevent ctags from following symlinks 2019-02-15 11:01:20 -08:00
.dir-locals.el scripts: use 4 space indentation 2019-04-12 08:30:31 +02:00
.editorconfig scripts: use 4 space indentation 2019-04-12 08:30:31 +02:00
.gitattributes git: indicate that tabs are never OK in the systemd tree 2013-10-30 02:25:38 +01:00
.gitignore gitignore: add nspawn image lock and mkosi temporary files 2018-09-07 20:00:22 +02:00
.lgtm.yml lgtm: use python3 2018-12-10 03:07:17 +09:00
.mailmap update .mailmap 2019-04-02 17:31:00 +02:00
.travis.yml travis: add another stage to really run everything under ASan+UBsan 2018-12-24 08:52:33 +01:00
.vimrc scripts: use 4 space indentation 2019-04-12 08:30:31 +02:00
.ycm_extra_conf.py ycm: add doc string for all the functions in configuration file 2017-11-29 13:21:49 -07:00
configure build-sys: add basic support for ./configure && make && make install 2017-07-18 10:05:06 -04:00
LICENSE.GPL2 relicense to LGPLv2.1 (with exceptions) 2012-04-12 00:24:39 +02:00
LICENSE.LGPL2.1 licence: remove references to old FSF address 2012-12-17 11:41:31 +01:00
Makefile build-sys: Fix Makefile wrapper for install target (#6548) 2017-08-07 11:29:20 +02:00
meson.build tree-wide: drop several missing_*.h and import relevant headers from kernel-5.0 2019-04-11 19:00:37 +02:00
meson_options.txt Merge pull request #11827 from keszybz/pkgconfig-variables 2019-02-26 18:58:03 +01:00
mkosi.build mkosi: let's update the boot loader also in /efi 2019-03-01 12:41:32 +01:00
mkosi.default mkosi: create .mkosi directory 2016-10-06 11:53:58 -04:00
NEWS NEWS: document kernel.pid_max change 2019-04-12 12:01:41 +02:00
README README: mention that we need tzdata >= 2014f 2019-02-28 15:38:47 +01:00
README.md Revert "README: remove Coverity Scan badge" 2019-02-14 12:13:55 +01:00
TODO Merge pull request #12226 from poettering/22bit-pids 2019-04-11 18:58:08 +02:00
zanata.xml po: add basic fedora.zanata.org configuration 2018-02-19 13:56:57 +01:00

systemd - System and Service Manager

Count of open issues over time Count of open pull requests over time Semaphore CI Build Status
Coverity Scan Status
CII Best Practices
Travis CI Build Status
Language Grade: C/C++
CentOS CI Build Status

Details

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 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.