From 672561f766e9a81b2c3947b58161d5c335c7a4c8 Mon Sep 17 00:00:00 2001 From: Tom Hromatka Date: Wed, 15 Dec 2021 20:48:31 +0000 Subject: [PATCH] abstraction-map: Add cpuset.effective_{cpus,mems} <-> cpuset.{cpus,mems}.effective mapping Add a name-only mapping to convert: cpuset.effective_cpus <-> cpuset.cpus.effective cpuset.effective_mems <-> cpuset.mems.effective Signed-off-by: Tom Hromatka Reviewed-by: Kamalesh Babulal --- src/abstraction-map.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/abstraction-map.c b/src/abstraction-map.c index 074ece9f..66066e64 100644 --- a/src/abstraction-map.c +++ b/src/abstraction-map.c @@ -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]); -- 2.47.2