From mboxrd@z Thu Jan 1 00:00:00 1970 From: ccmail111 Subject: Re: cgroup tasks file error Date: Tue, 14 Dec 2010 10:22:32 -0800 (PST) Message-ID: <478906.58374.qm@web34205.mail.mud.yahoo.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Balbir Singh Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org List-Id: containers.vger.kernel.org --- On Tue, 12/14/10, Balbir Singh wrote: > From: Balbir Singh > Subject: Re: cgroup tasks file error > To: "ccmail111" > Cc: "Jue Hong" , containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org > Date: Tuesday, December 14, 2010, 12:41 PM > On Tue, Dec 14, 2010 at 11:03 PM, > ccmail111 > 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 =A0 =A0 =A0 575 =A00.6 =A00.9 =A088816 =A02216 ? =A0 =A0 > =A0 =A0Sl =A0 17:28 =A0 0:00 myproc --daemon > > root =A0 =A0 =A0 654 =A00.0 =A00.2 =A0 4044 =A0 664 ttyS0 =A0 > =A0S+ =A0 17:29 =A0 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=3D0(root) gid=3D0(root) groups=3D0(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=3D0(root) gid=3D0(root) groups=3D0(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=3D0(root) gid=3D0(root) groups=3D0(root) [host:~]$ =