Messages in this thread | | | Date | Tue, 11 Oct 2011 11:02:38 +0800 | From | Li Zefan <> | Subject | Re: [Fwd: Re: cgroup umount bug] |
| |
>> I'm not sure from what you write whether you're aware of this, but >> to work around this, you can then >> >> mount -t cgroup -o cpu /mnt >> for i in `cat /mnt/test/tasks`; do >> echo $i > /mnt/tasks >> done >> rmdir /mnt/test >> umount /mnt >> >> and now you can >> >> mount -cgroup -o cpu,cpuset cgroup /mnt >> > > I know that I can bypass this problem by deleting subgroups before > unmount. But there is no document mentioning that I should do this to > avoid it. But even if there is, users may still directly umount it > accidentally, then he should try to remember what he has done and back > to the scene to make it up, or he may need to reboot his server to do > another test : ( .
You can check /proc/cgroups:
# mount -t cgroup -o cpu,cpuset cgroup /mnt # mkdir /mnt/sub # umount /mnt # cat /proc/cgroups #subsys_name hierarchy num_cgroups enabled cpuset 1 2 1 cpu 1 2 1 memory 0 1 1 devices 0 1 1 freezer 0 1 1 net_cls 0 1 1 blkio 0 1 1
> So, since there is nothing good to permit incompletely unmount, why > not prevent the potential problem by prohibiting this behavior at > first ? >
| |