From: Li Zefan <lizf-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
To: anqin <anqin.qin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Linux Containers
<containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org>
Subject: Re: Can not remove the subdirectory in cgroup pseudo-filesystem
Date: Thu, 26 Mar 2009 09:15:00 +0800 [thread overview]
Message-ID: <49CAD714.4080307@cn.fujitsu.com> (raw)
In-Reply-To: <d95d44a20903251011u5786c780wb3a0a0cc3b759689-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
anqin wrote:
>> Yes you have to initialize some cpuset files first. Otherwise
>> the tasks have no access to any memory or cpus.
>>
>
> Oh... thank you for reminding. Previously, I run my tests in
> a experimental kernel, it seems someone has set the
> parameters.
>
>
> BTW, is it possible currently to combine two tasks into
> one cgroup? for instance, I have run two bashes (bash_A and
I recomend you to read Documentation/cgroups/cgroups.txt to know
cgroup better. Cgroup is used to aggregate/partition sets of tasks,
so of course you can put more than 1 task into a cgroup.
> bash_B). Now, in bash_A, I created a cgroup in procfs:
>
> # mount -t cgroup cgroup /mnt/cgrp
mount cgroupfs with all cgroup subsystems is not so sane IMO.
> # cd /mnt/cgrp
> # mkdir test
> # echo $$ > test/tasks
>
> Then, I would like to add bash_B in this task group but
> fail:
>
> # echo #(PID_OF_bash_B) > test/tasks
> -bash: echo: write error: Operation not permitted
>
That's because ns_cgroup is binded in this cgroup hierarchy, and
it's ns_cgroup that prevents the task attaching, but a patch in
-mm tree relaxes this check, and you won't see this restriction
when using ns_cgroup.
> It seems the cgroup can not couple two irrelevant
> task together, right?
>
>
> Best,
>
> Anqin
next prev parent reply other threads:[~2009-03-26 1:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-25 16:24 Can not remove the subdirectory in cgroup pseudo-filesystem anqin
[not found] ` <d95d44a20903250924p2fb28afdq7ac47cac372c7de3-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-03-25 16:37 ` Serge E. Hallyn
[not found] ` <20090325163702.GA17626-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-03-25 17:11 ` anqin
[not found] ` <d95d44a20903251011u5786c780wb3a0a0cc3b759689-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-03-26 1:15 ` Li Zefan [this message]
[not found] ` <49CAD714.4080307-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2009-03-26 1:51 ` Serge E. Hallyn
2009-03-27 3:06 ` anqin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49CAD714.4080307@cn.fujitsu.com \
--to=lizf-bthxqxjhjhxqfuhtdcdx3a@public.gmane.org \
--cc=anqin.qin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.