]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/basic/cgroup-util.c
cgroup v2: Don't require CPU controller for CPU accounting in 4.15+
authorChris Down <chris@chrisdown.name>
Sat, 17 Nov 2018 11:19:07 +0000 (11:19 +0000)
committerChris Down <chris@chrisdown.name>
Sun, 18 Nov 2018 12:21:41 +0000 (12:21 +0000)
commitf98c25850fa5eaad815d7ea2cf51f5795ab43d42
tree95ab2fbcd447052fd47112c4a8882a5eecaec842
parent4472fa6d2c324be002ea04dd10070f7bbac261cf
cgroup v2: Don't require CPU controller for CPU accounting in 4.15+

systemd only uses functions that are as of Linux 4.15+ provided
externally to the CPU controller (currently usage_usec), so if we have a
new enough kernel, we don't need to set CGROUP_MASK_CPU for
CPUAccounting=true as the CPU controller does not need to necessarily be
enabled in this case.

Part of this patch is modelled on an earlier patch by Ryutaroh Matsumoto
(see PR #9665).
src/basic/cgroup-util.c
src/basic/cgroup-util.h
src/core/cgroup.c
src/core/dbus-cgroup.c
src/test/test-cgroup-mask.c
test/daughter.service