On Wed, 2007-09-26 at 08:55 +0530, Balbir Singh wrote: > Badari Pulavarty wrote: > > Hi, > > > > I am playing with control groups on 2.6.23-rc8-mm1. > > > > I am able to mount cgroup and create subgroups. I was able > > to move some tasks into them. But, after killing tasks I am > > not able to remove the subgroups. Any idea on why ? > > > > Thanks, > > Badari > > > > Badari, > > We account for page cache usage as well now, I suspect you > most likely have page/swap cache pages charged to the container. Yep. Even after killing all the tasks and "echo 1 > drop_caches" some memory still accounted for on this group. elm3b155:/dev/cgroup # cat zzz/memory.usage_in_bytes 131072 > You can try several options (some documented in Documentation/ > controllers/memory.txt) > > 1. Try executing sync; echo 1 > /proc/sys/vm/drop_caches > and then remove the directory > 2. Prior to assigning tasks, set memory.control_type to 1, > that tracks only RSS pages. You'll find memory.usage_in_bytes > go to zero as soon as all the tasks exit This helped. > 3. Set notify_on_release and use the release_agent and releasable > to free the container once all pages charged to it are freed. > > I wonder if I should provide a force_reclaim (hard to guarantee > it will work) for each container, so that the container can > be freed. > BTW, how do I detach a "pid" from the cgroup ? Thanks, Badari _______________________________________________ Containers mailing list Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linux-foundation.org/mailman/listinfo/containers