Ninjatrappeur's systemd working tree
Go to file
Tejun Heo 5da38d0768 core: use the unified hierarchy for the systemd cgroup controller hierarchy
Currently, systemd uses either the legacy hierarchies or the unified hierarchy.
When the legacy hierarchies are used, systemd uses a named legacy hierarchy
mounted on /sys/fs/cgroup/systemd without any kernel controllers for process
management.  Due to the shortcomings in the legacy hierarchy, this involves a
lot of workarounds and complexities.

Because the unified hierarchy can be mounted and used in parallel to legacy
hierarchies, there's no reason for systemd to use a legacy hierarchy for
management even if the kernel resource controllers need to be mounted on legacy
hierarchies.  It can simply mount the unified hierarchy under
/sys/fs/cgroup/systemd and use it without affecting other legacy hierarchies.
This disables a significant amount of fragile workaround logics and would allow
using features which depend on the unified hierarchy membership such bpf cgroup
v2 membership test.  In time, this would also allow deleting the said
complexities.

This patch updates systemd so that it prefers the unified hierarchy for the
systemd cgroup controller hierarchy when legacy hierarchies are used for kernel
resource controllers.

* cg_unified(@controller) is introduced which tests whether the specific
  controller in on unified hierarchy and used to choose the unified hierarchy
  code path for process and service management when available.  Kernel
  controller specific operations remain gated by cg_all_unified().

* "systemd.legacy_systemd_cgroup_controller" kernel argument can be used to
  force the use of legacy hierarchy for systemd cgroup controller.

* nspawn: By default nspawn uses the same hierarchies as the host.  If
  UNIFIED_CGROUP_HIERARCHY is set to 1, unified hierarchy is used for all.  If
  0, legacy for all.

* nspawn: arg_unified_cgroup_hierarchy is made an enum and now encodes one of
  three options - legacy, only systemd controller on unified, and unified.  The
  value is passed into mount setup functions and controls cgroup configuration.

* nspawn: Interpretation of SYSTEMD_CGROUP_CONTROLLER to the actual mount
  option is moved to mount_legacy_cgroup_hierarchy() so that it can take an
  appropriate action depending on the configuration of the host.

v2: - CGroupUnified enum replaces open coded integer values to indicate the
      cgroup operation mode.
    - Various style updates.

v3: Fixed a bug in detect_unified_cgroup_hierarchy() introduced during v2.

v4: Restored legacy container on unified host support and fixed another bug in
    detect_unified_cgroup_hierarchy().
2016-08-17 17:44:36 -04:00
.github documentation: add a short document describing how to test your systemd build tree (#3763) 2016-07-20 22:15:54 -04:00
catalog catalog: make support URL to show in shipped catalog entries configurable (#3597) 2016-06-26 17:43:37 +02:00
coccinelle tree-wide: htonl() is weird, let's use htobe32() instead (#3538) 2016-06-15 01:26:01 +02:00
docs docs: add .gitignore 2015-07-06 17:47:38 +02:00
factory/etc factory: remove broken pam_limits 2014-07-30 15:21:54 +02:00
hwdb hwdb: normalize spacing in 60-keyboard.hwdb (#3954) 2016-08-13 17:14:58 +02:00
m4 build-sys: Perform flag tests in context to existing flags 2016-02-06 14:57:46 +01:00
man Merge pull request #3905 from htejun/cgroup-v2-cpu 2016-08-14 18:03:35 -04:00
network network: allow LLDP packets to cross non-customer bridges for container network interfaces 2016-05-09 15:45:31 +02:00
po PO: italian updates (#3761) 2016-07-20 13:02:28 +02:00
rules rules: make sure always set at least one property on rfkill devices 2016-07-20 09:17:57 +02:00
shell-completion zsh: _systemctl: do not attempt to use "--system" by default (#3951) 2016-08-13 10:42:55 -04:00
src core: use the unified hierarchy for the systemd cgroup controller hierarchy 2016-08-17 17:44:36 -04:00
sysctl.d treewide: fix typos and remove accidental repetition of words 2016-07-11 16:18:43 +02:00
system-preset preset: enable machines.target by default 2014-12-29 17:36:57 +01:00
sysusers.d remove bus-proxyd 2016-02-12 19:10:01 +01:00
test test: fix test-execute personality tests on ppc64 and aarch64 (#3825) 2016-08-02 16:22:56 +02:00
tmpfiles.d treewide: fix typos and remove accidental repetition of words 2016-07-11 16:18:43 +02:00
tools Remove systemd-bootchart 2016-02-23 13:30:09 +01:00
units units: do not start load-random-seed in containers (#3941) 2016-08-13 17:15:19 +02:00
xorg login: support user-bus on dbus1 2015-08-31 18:12:37 +02:00
.dir-locals.el editors: only extend line width to 119 for C and XML files 2016-02-10 12:29:32 +01:00
.editorconfig editors: only extend line width to 119 for C and XML files 2016-02-10 12:29:32 +01:00
.gitattributes git: indicate that tabs are never OK in the systemd tree 2013-10-30 02:25:38 +01:00
.gitignore keymap-util: add tests and fix one small bug 2016-06-06 09:22:33 -04:00
.mailmap NEWS: update mailmap to bring NEWS and "make git-contrib" in line 2016-07-25 15:03:46 +02:00
.travis.yml remove gudev and gtk-doc 2015-06-03 00:22:53 +02:00
.vimrc vimrc: fix indentation logic for our docbook xml files 2016-04-29 12:23:34 +02:00
.ycm_extra_conf.py ycm: update flag blacklist 2014-06-04 15:41:10 -04:00
CODING_STYLE CODING_STYLE fixes (#3804) 2016-07-25 22:34:42 +03:00
DISTRO_PORTING build-sys: warn if people don't change the default NTP servers when building systemd 2015-07-11 14:24:29 -03:00
HACKING documentation: add a short document describing how to test your systemd build tree (#3763) 2016-07-20 22:15:54 -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-man.am nss: add new "nss-systemd" NSS module for mapping dynamic users 2016-07-22 15:53:45 +02:00
Makefile.am build-sys: hook up the hwdb parser to check 2016-08-09 00:42:52 -04:00
NEWS journald: deprecate SplitMode=login (#3805) 2016-07-26 08:19:33 +02:00
README nss: add new "nss-systemd" NSS module for mapping dynamic users 2016-07-22 15:53:45 +02:00
README.md documentation: add a short document describing how to test your systemd build tree (#3763) 2016-07-20 22:15:54 -04:00
TODO Merge pull request #3884 from poettering/private-users 2016-08-06 17:04:45 -04:00
autogen.sh Ensure kdbus isn't used (#3501) 2016-06-18 17:24:23 -04:00
configure.ac nss-systemd: resolve root/nobody statically 2016-08-04 23:08:05 +02:00
mkosi.build mkosi: make sure we fail on error 2016-07-19 12:30:34 +02:00
mkosi.default build-sys: add mkosi hookup (#3731) 2016-07-15 20:00:44 -04:00

README.md

systemd - System and Service Manager

Build Status
Coverity Scan Status

Details

General information about systemd can be found in the systemd Wiki.

Information about build requirements are 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 file for information 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.