Skip to contentSkip to conversation

cgroup_fj/cgroup_fj_common.sh:cpuset prefix issue

PATCH New [email protected] 2 participants 2 messages Jul 12, 2016 – Jul 13, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cgroup_fj/cgroup_fj_common.sh:cpuset prefix issue

From: Shuang Qiu <[email protected]>

As the legacy of:
commit 8793d854edbc2774943a4b0de3304dc73991159a
Author: Paul Menage <[email protected]>
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.

---
 .../controllers/cgroup_fj/cgroup_fj_common.sh      |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
testcases/kernel/controllers/cgroup_fj/cgroup_fj_common.sh +7 -2
index df2cbfc..13e2938 100755
@@ -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
 }
 
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/1 cgroup_fj/cgroup_fj_common.sh:cpuset prefix issue

----- Original Message -----

Quoted 16 lines

From: "shuang qiu" <[email protected]>
To: [email protected]
Sent: Tuesday, 12 July, 2016 5:43:41 PM
Subject: [LTP] [PATCH] cgroup_fj/cgroup_fj_common.sh:cpuset prefix issue

From: Shuang Qiu <[email protected]>

As the legacy of:
commit 8793d854edbc2774943a4b0de3304dc73991159a
Author: Paul Menage <[email protected]>
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.

Quoted 1 line

Pushed with small tweaks to commit message.

Regards,
Jan