Re: cgroup tasks file error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Dec 13, 2010 at 05:16:28PM -0600, Serge E. Hallyn wrote:
> Quoting ccmail111 (ccmail111@xxxxxxxxx):
> > 
> > I see error:[host:/dev/cgroup]$ echo 693 > hello-test/tasks
> > -bash: echo: write error: No space left on device

This does seem quite odd so I spent a little time looking
at this and I agree with Serge.

> > [host:/dev/cgroup]$ pwd/dev/cgroup
> > 
> > But the user process is up and running..
> > 
> > [host:/dev/cgroup]$ ps aux | grep procroot       
> > 
> > 693  0.0  0.4  34720  1112 ttyS0    Sl   19:11   0:00 /opt/bin/myproc -ext
> > 
> > Also the cgroup exists and valid..
> > 
> > [host:/dev/cgroup]$ ls | grep hello-test
> > hello-test
> > 
> > What above error mean and any suggestions ?
> > Please email.
> 
> Which cgroups do you have composed on that mount?  I'm guess you
> have cpuset, and you need to set the cpuset.mems and cpuset.cpus.
> Until you do that, no tasks can be assigned to it.

I looked a a few places in kernel/cgroup.c which return ENOSPC
or could potentially forward such an error. The only place that
fits is in the attach path and is consistent with the notion that
it's a cpuset issue:

echo <pid> > tasks =>
cgroup_tasks_write() =>
attach_task_by_pid() =>
cgroup_attach_task() => (via ss->can_attach() where ss is the cpuset subsystem)
cpuset_can_attach():
        if (cpumask_empty(cs->cpus_allowed) || nodes_empty(cs->mems_allowed))
			return -ENOSPC;

No other cgroup subsystem that I looked at (freezer, memcontrol, ns,
	blkio, devcgroup) returns ENOSPC when attaching a task.

So not only do you need to set those masks but each mask must have at
least one cpu and "mem" respectively.

Cheers,
	-Matt Helsley
_______________________________________________
Containers mailing list
Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/containers



[Index of Archives]     [Cgroups]     [Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux