[LTP] [PATCH] cgroup_fj/cgroup_fj_common.sh:cpuset prefix issue
shuang.qiu@oracle.com
shuang.qiu@oracle.com
Tue Jul 12 17:43:41 CEST 2016
From: Shuang Qiu <shuang.qiu@oracle.com>
As the legacy of:
commit 8793d854edbc2774943a4b0de3304dc73991159a
Author: Paul Menage <menage@google.com>
Date: Thu Oct 18 23:39:39 2007 -0700
Task Control Groups: make cpusets a client of cgroups
there is no cpuset. prefix for cpuset subsystem if ever mount it as cpuset type.
So try either $mount_point/XXXX or $mount_point/cpuset.XXXX.
Signed-off-by: Shuang Qiu <shuang.qiu@oracle.com>
---
.../controllers/cgroup_fj/cgroup_fj_common.sh | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/testcases/kernel/controllers/cgroup_fj/cgroup_fj_common.sh b/testcases/kernel/controllers/cgroup_fj/cgroup_fj_common.sh
index df2cbfc..13e2938 100755
--- a/testcases/kernel/controllers/cgroup_fj/cgroup_fj_common.sh
+++ b/testcases/kernel/controllers/cgroup_fj/cgroup_fj_common.sh
@@ -69,8 +69,13 @@ create_subgroup()
# cpuset.cpus and cpuset.mems must be initialized with suitable value
# before any pids are attached
if [ "$subsystem" == "cpuset" ]; then
- ROD cat "$mount_point/cpuset.cpus" \> "$path/cpuset.cpus"
- ROD cat "$mount_point/cpuset.mems" \> "$path/cpuset.mems"
+ if [ -e "$mount_point/cpus" ]; then
+ ROD cat "$mount_point/cpus" \> "$path/cpus"
+ ROD cat "$mount_point/mems" \> "$path/mems"
+ else
+ ROD cat "$mount_point/cpuset.cpus" \> "$path/cpuset.cpus"
+ ROD cat "$mount_point/cpuset.mems" \> "$path/cpuset.mems"
+ fi
fi
}
--
1.7.9.5
More information about the ltp
mailing list