diff options
author | Pavel Hrdina <phrdina@redhat.com> | 2019-07-29 17:50:05 +0200 |
---|---|---|
committer | Pavel Hrdina <phrdina@redhat.com> | 2019-09-24 15:16:07 +0200 |
commit | 047f5d63d7a1ab75073f8485e2f9b550d25b0772 (patch) | |
tree | 1d0050d1a22e2b9fda999b0e7b3fad2b13a1709d /src/test/test-cgroup-mask.c | |
parent | 68c2b5ddb1881c40201c1d86a7852dd5c5c06a76 (diff) | |
download | systemd-047f5d63d7a1ab75073f8485e2f9b550d25b0772.tar.gz |
cgroup: introduce support for cgroup v2 CPUSET controller
Introduce support for configuring cpus and mems for processes using
cgroup v2 CPUSET controller. This allows users to limit which cpus
and memory NUMA nodes can be used by processes to better utilize
system resources.
The cgroup v2 interfaces to control it are cpuset.cpus and cpuset.mems
where the requested configuration is written. However, it doesn't mean
that the requested configuration will be actually used as parent cgroup
may limit the cpus or mems as well. In order to reflect the real
configuration cgroup v2 provides read-only files cpuset.cpus.effective
and cpuset.mems.effective which are exported to users as well.
Diffstat (limited to 'src/test/test-cgroup-mask.c')
-rw-r--r-- | src/test/test-cgroup-mask.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/test/test-cgroup-mask.c b/src/test/test-cgroup-mask.c index 72a6551ffd..ef3755de41 100644 --- a/src/test/test-cgroup-mask.c +++ b/src/test/test-cgroup-mask.c @@ -129,9 +129,10 @@ static void test_cg_mask_to_string_one(CGroupMask mask, const char *t) { static void test_cg_mask_to_string(void) { test_cg_mask_to_string_one(0, NULL); - test_cg_mask_to_string_one(_CGROUP_MASK_ALL, "cpu cpuacct io blkio memory devices pids bpf-firewall bpf-devices"); + test_cg_mask_to_string_one(_CGROUP_MASK_ALL, "cpu cpuacct cpuset io blkio memory devices pids bpf-firewall bpf-devices"); test_cg_mask_to_string_one(CGROUP_MASK_CPU, "cpu"); test_cg_mask_to_string_one(CGROUP_MASK_CPUACCT, "cpuacct"); + test_cg_mask_to_string_one(CGROUP_MASK_CPUSET, "cpuset"); test_cg_mask_to_string_one(CGROUP_MASK_IO, "io"); test_cg_mask_to_string_one(CGROUP_MASK_BLKIO, "blkio"); test_cg_mask_to_string_one(CGROUP_MASK_MEMORY, "memory"); |