[Devel] Re: cgroup tasks file error

ccmail111 ccmail111 at yahoo.com
Tue Dec 14 10:24:17 PST 2010



--- On Tue, 12/14/10, Balbir Singh <balbir at linux.vnet.ibm.com> wrote:

> From: Balbir Singh <balbir at linux.vnet.ibm.com>
> Subject: Re: cgroup tasks file error
> To: "ccmail111" <ccmail111 at yahoo.com>
> Cc: "Jue Hong" <honshj at gmail.com>, containers at lists.linux-foundation.org
> Date: Tuesday, December 14, 2010, 12:41 PM
> On Tue, Dec 14, 2010 at 11:03 PM,
> ccmail111 <ccmail111 at yahoo.com>
> wrote:
> >
> > Isn't ns mounted by default ?
> > I rebooted machine,
> > based on 2.6.32 kernel.
> >
> > Then,
> >
> > [host:~]$ mkdir /dev/cgroup
> > [host:~]$ mount -t cgroup cpuset -ocpuset,ns
> /dev/cgroup
> > [host:~]$ ps aux | grep libvirt
> > root       575  0.6  0.9  88816  2216 ?    
>    Sl   17:28   0:00 myproc --daemon
> > root       654  0.0  0.2   4044   664 ttyS0  
>  S+   17:29   0:00 grep libvirt
> > [host:~]$ mkdir /dev/cgroup/hello
> > [host:~]$ cat /dev/cgroup/hello/tasks
> > [host:~]$ echo 0 > /dev/cgroup/hello/cpuset.cpus
> > [host:~]$ echo 0 > /dev/cgroup/hello/cpuset.mems
> 
> Can you paste the output of
> 
> cat /dev/cgroup/hello/cpuset.cpus and mems.
> 
> Also please paste the o/p of /dev/cgroup/cpuset.cpus and
> mems
> 
> > [host:~]$ echo 575 > /dev/cgroup/hello/tasks
> > [host:~]$ cat /dev/cgroup/hello/tasks
> > 575
> > [host:~]$ id
> > uid=0(root) gid=0(root) groups=0(root)
> > [host:~]$
> >
> > Now, I try to move the task out - the parent/root:
> >
> > [host:~]$ echo 575 > /dev/cgroup/tasks
> > -bash: echo: write error: Operation not permitted
> 
> can you send us the o/p of
> 
> ls -al /dev/cgroup
> 
> and ls -al /dev/cgroup/hello
> 
> Balbir
> 
----

Please find output requested below:


[host:~]$ mkdir /dev/cgroup/hello
[host:~]$ cat /dev/cgroup/hello/tasks
[host:~]$ echo 0 > /dev/cgroup/hello/cpuset.cpus
[host:~]$ echo 0 > /dev/cgroup/hello/cpuset.mems
[host:~]$ echo 575 > /dev/cgroup/hello/tasks
[host:~]$ cat /dev/cgroup/hello/tasks
575
[host:~]$ id
uid=0(root) gid=0(root) groups=0(root)
[host:~]$ echo 575 > /dev/cgroup/tasks
-bash: echo: write error: Operation not permitted
[host:~]$ cat /dev/cgroup/hello/cpuset.cpus
0
[host:~]$ cat /dev/cgroup/hello/cpuset.mems
0
[host:~]$ cat /dev/cgroup/cpuset.mems
0
[host:~]$ cat /dev/cgroup/cpuset.cpus
0
[host:~]$ ls -al /dev/cgroup/
total 0
drwxr-xr-x  3 root root    0 Dec 14 17:29 .
drwxr-xr-x 11 root root 2980 Dec 14 17:29 ..
-r--r--r--  1 root root    0 Dec 14 17:29 cgroup.procs
-rw-r--r--  1 root root    0 Dec 14 17:29 cpuset.cpu_exclusive
-rw-r--r--  1 root root    0 Dec 14 17:29 cpuset.cpus
-rw-r--r--  1 root root    0 Dec 14 17:29 cpuset.mem_exclusive
-rw-r--r--  1 root root    0 Dec 14 17:29 cpuset.mem_hardwall
-rw-r--r--  1 root root    0 Dec 14 17:29 cpuset.memory_migrate
-r--r--r--  1 root root    0 Dec 14 17:29 cpuset.memory_pressure
-rw-r--r--  1 root root    0 Dec 14 17:29 cpuset.memory_pressure_enabled
-rw-r--r--  1 root root    0 Dec 14 17:29 cpuset.memory_spread_page
-rw-r--r--  1 root root    0 Dec 14 17:29 cpuset.memory_spread_slab
-rw-r--r--  1 root root    0 Dec 14 17:29 cpuset.mems
-rw-r--r--  1 root root    0 Dec 14 17:29 cpuset.sched_load_balance
-rw-r--r--  1 root root    0 Dec 14 17:29 cpuset.sched_relax_domain_level
drwxr-xr-x  2 root root    0 Dec 14 17:29 hello
-rw-r--r--  1 root root    0 Dec 14 17:29 notify_on_release
-rw-r--r--  1 root root    0 Dec 14 17:29 release_agent
-rw-r--r--  1 root root    0 Dec 14 17:31 tasks
[host:~]$ ls -al /dev/cgroup/hello/
total 0
drwxr-xr-x 2 root root 0 Dec 14 17:29 .
drwxr-xr-x 3 root root 0 Dec 14 17:29 ..
-r--r--r-- 1 root root 0 Dec 14 17:29 cgroup.procs
-rw-r--r-- 1 root root 0 Dec 14 17:29 cpuset.cpu_exclusive
-rw-r--r-- 1 root root 0 Dec 14 17:30 cpuset.cpus
-rw-r--r-- 1 root root 0 Dec 14 17:29 cpuset.mem_exclusive
-rw-r--r-- 1 root root 0 Dec 14 17:29 cpuset.mem_hardwall
-rw-r--r-- 1 root root 0 Dec 14 17:29 cpuset.memory_migrate
-r--r--r-- 1 root root 0 Dec 14 17:29 cpuset.memory_pressure
-rw-r--r-- 1 root root 0 Dec 14 17:29 cpuset.memory_spread_page
-rw-r--r-- 1 root root 0 Dec 14 17:29 cpuset.memory_spread_slab
-rw-r--r-- 1 root root 0 Dec 14 17:30 cpuset.mems
-rw-r--r-- 1 root root 0 Dec 14 17:29 cpuset.sched_load_balance
-rw-r--r-- 1 root root 0 Dec 14 17:29 cpuset.sched_relax_domain_level
-rw-r--r-- 1 root root 0 Dec 14 17:29 notify_on_release
-rw-r--r-- 1 root root 0 Dec 14 17:30 tasks
[host:~]$ id
uid=0(root) gid=0(root) groups=0(root)
[host:~]$



      
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers




More information about the Devel mailing list