From: Shuang Qiu <shuang.qiu@oracle.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] cgroup_fj/cgroup_fj_common.sh:cpuset prefix issue
Date: Tue, 12 Jul 2016 23:42:13 +0800 [thread overview]
Message-ID: <57850FD5.2010503@oracle.com> (raw)
In-Reply-To: <848101059.3653487.1468242721685.JavaMail.zimbra@redhat.com>
Thanks for explain this,Jan.
Will update the description.
Thanks
Shuang
On 07/11/2016 09:12 PM, Jan Stancek wrote:
>
>
>
> ----- Original Message -----
>> From: "shuang qiu" <shuang.qiu@oracle.com>
>> To: ltp@lists.linux.it
>> Sent: Friday, 8 July, 2016 8:49:02 AM
>> Subject: [LTP] [PATCH] cgroup_fj/cgroup_fj_common.sh:cpuset prefix issue
>>
>> 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.
> This appears to be due to 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
>
> so it depends on how you mount it:
>
> # mount -t cpuset cpuset /mnt/test
> # ls -la /mnt/test
> total 0
> drwxr-xr-x. 2 root root 0 Jul 11 15:01 .
> drwxr-xr-x. 6 root root 63 Jul 11 14:58 ..
> -rw-r--r--. 1 root root 0 Jul 11 15:01 cgroup.clone_children
> --w--w--w-. 1 root root 0 Jul 11 15:01 cgroup.event_control
> -rw-r--r--. 1 root root 0 Jul 11 15:01 cgroup.procs
> -r--r--r--. 1 root root 0 Jul 11 15:01 cgroup.sane_behavior
> -rw-r--r--. 1 root root 0 Jul 11 15:01 cpu_exclusive
> -rw-r--r--. 1 root root 0 Jul 11 15:01 cpus
> -rw-r--r--. 1 root root 0 Jul 11 15:01 mem_exclusive
> -rw-r--r--. 1 root root 0 Jul 11 15:01 mem_hardwall
> -rw-r--r--. 1 root root 0 Jul 11 15:01 memory_migrate
> -r--r--r--. 1 root root 0 Jul 11 15:01 memory_pressure
> -rw-r--r--. 1 root root 0 Jul 11 15:01 memory_pressure_enabled
> -rw-r--r--. 1 root root 0 Jul 11 15:01 memory_spread_page
> -rw-r--r--. 1 root root 0 Jul 11 15:01 memory_spread_slab
> -rw-r--r--. 1 root root 0 Jul 11 15:01 mems
> -rw-r--r--. 1 root root 0 Jul 11 15:01 notify_on_release
> -rw-r--r--. 1 root root 0 Jul 11 15:01 release_agent
> -rw-r--r--. 1 root root 0 Jul 11 15:01 sched_load_balance
> -rw-r--r--. 1 root root 0 Jul 11 15:01 sched_relax_domain_level
> -rw-r--r--. 1 root root 0 Jul 11 15:01 tasks
>
> # mount -t cgroup -o cpuset cpuset /mnt/test
> # ls -la /mnt/test
> total 0
> drwxr-xr-x. 2 root root 0 Jul 11 15:02 .
> drwxr-xr-x. 6 root root 63 Jul 11 14:58 ..
> -rw-r--r--. 1 root root 0 Jul 11 15:02 cgroup.clone_children
> --w--w--w-. 1 root root 0 Jul 11 15:02 cgroup.event_control
> -rw-r--r--. 1 root root 0 Jul 11 15:02 cgroup.procs
> -r--r--r--. 1 root root 0 Jul 11 15:02 cgroup.sane_behavior
> -rw-r--r--. 1 root root 0 Jul 11 15:02 cpuset.cpu_exclusive
> -rw-r--r--. 1 root root 0 Jul 11 15:02 cpuset.cpus
> -rw-r--r--. 1 root root 0 Jul 11 15:02 cpuset.mem_exclusive
> -rw-r--r--. 1 root root 0 Jul 11 15:02 cpuset.mem_hardwall
> -rw-r--r--. 1 root root 0 Jul 11 15:02 cpuset.memory_migrate
> -r--r--r--. 1 root root 0 Jul 11 15:02 cpuset.memory_pressure
> -rw-r--r--. 1 root root 0 Jul 11 15:02 cpuset.memory_pressure_enabled
> -rw-r--r--. 1 root root 0 Jul 11 15:02 cpuset.memory_spread_page
> -rw-r--r--. 1 root root 0 Jul 11 15:02 cpuset.memory_spread_slab
> -rw-r--r--. 1 root root 0 Jul 11 15:02 cpuset.mems
> -rw-r--r--. 1 root root 0 Jul 11 15:02 cpuset.sched_load_balance
> -rw-r--r--. 1 root root 0 Jul 11 15:02 cpuset.sched_relax_domain_level
> -rw-r--r--. 1 root root 0 Jul 11 15:02 notify_on_release
> -rw-r--r--. 1 root root 0 Jul 11 15:02 release_agent
> -rw-r--r--. 1 root root 0 Jul 11 15:02 tasks
>
> Patch looks OK to me, description could be more verbose.
>
> Regards,
> Jan
>
>> 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
>>
>>
>> --
>> Mailing list info: https://lists.linux.it/listinfo/ltp
>>
next prev parent reply other threads:[~2016-07-12 15:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
-- strict thread matches above, loose matches on Subject: below --
2016-07-12 15:43 shuang.qiu
2016-07-13 13:31 ` Jan Stancek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=57850FD5.2010503@oracle.com \
--to=shuang.qiu@oracle.com \
--cc=ltp@lists.linux.it \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox