public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP]  [PATCH] cgroup_fj/cgroup_fj_common.sh:cpuset prefix issue
@ 2016-07-08  6:49 shuang.qiu
  2016-07-11 13:12 ` Jan Stancek
  0 siblings, 1 reply; 5+ messages in thread
From: shuang.qiu @ 2016-07-08  6:49 UTC (permalink / raw)
  To: ltp

From: Shuang Qiu <shuang.qiu@oracle.com>

Sometimes there is no cpuset. prefix for cpuset subsystem.
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


^ permalink raw reply related	[flat|nested] 5+ messages in thread
* [LTP]  [PATCH] cgroup_fj/cgroup_fj_common.sh:cpuset prefix issue
@ 2016-07-12 15:43 shuang.qiu
  2016-07-13 13:31 ` Jan Stancek
  0 siblings, 1 reply; 5+ messages in thread
From: shuang.qiu @ 2016-07-12 15:43 UTC (permalink / raw)
  To: ltp

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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-07-13 13:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-08  6:49 [LTP] [PATCH] cgroup_fj/cgroup_fj_common.sh:cpuset prefix issue shuang.qiu
2016-07-11 13:12 ` Jan Stancek
2016-07-12 15:42   ` Shuang Qiu
  -- strict thread matches above, loose matches on Subject: below --
2016-07-12 15:43 shuang.qiu
2016-07-13 13:31 ` Jan Stancek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox