]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
abstraction-map: Add cpuset.effective_{cpus,mems} <-> cpuset.{cpus,mems}.effective...
authorTom Hromatka <tom.hromatka@oracle.com>
Wed, 15 Dec 2021 20:48:31 +0000 (20:48 +0000)
committerTom Hromatka <tom.hromatka@oracle.com>
Thu, 3 Feb 2022 21:42:35 +0000 (14:42 -0700)
Add a name-only mapping to convert:
cpuset.effective_cpus <-> cpuset.cpus.effective
cpuset.effective_mems <-> cpuset.mems.effective

Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
Reviewed-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
src/abstraction-map.c

index 074ece9f72137d982d1bafed6e1cc4224829f479..66066e64bdef50848242004f65b2c425460c613e 100644 (file)
@@ -35,6 +35,12 @@ const struct cgroup_abstraction_map cgroup_v1_to_v2_map[] = {
        {cgroup_convert_int, "cpu.shares", (void *)1024, "cpu.weight", (void *)100},
        {cgroup_convert_cpu_quota_to_max, "cpu.cfs_quota_us", NULL, "cpu.max", NULL},
        {cgroup_convert_cpu_period_to_max, "cpu.cfs_period_us", NULL, "cpu.max", NULL},
+
+       /* cpuset controller */
+       {cgroup_convert_name_only, "cpuset.effective_cpus", NULL,
+               "cpuset.cpus.effective", NULL},
+       {cgroup_convert_name_only, "cpuset.effective_mems", NULL,
+               "cpuset.mems.effective", NULL},
 };
 const int cgroup_v1_to_v2_map_sz = sizeof(cgroup_v1_to_v2_map) /
                                   sizeof(cgroup_v1_to_v2_map[0]);
@@ -43,6 +49,12 @@ const struct cgroup_abstraction_map cgroup_v2_to_v1_map[] = {
        {cgroup_convert_int, "cpu.weight", (void *)100, "cpu.shares", (void *)1024},
        {cgroup_convert_cpu_max_to_quota, "cpu.max", NULL, "cpu.cfs_quota_us", NULL},
        {cgroup_convert_cpu_max_to_period, "cpu.max", NULL, "cpu.cfs_period_us", NULL},
+
+       /* cpuset controller */
+       {cgroup_convert_name_only, "cpuset.cpus.effective", NULL,
+               "cpuset.effective_cpus", NULL},
+       {cgroup_convert_name_only, "cpuset.mems.effective", NULL,
+               "cpuset.effective_mems", NULL},
 };
 const int cgroup_v2_to_v1_map_sz = sizeof(cgroup_v2_to_v1_map) /
                                   sizeof(cgroup_v2_to_v1_map[0]);