From: "KAMEZAWA Hiroyuki" <kamezawa.hiroyu@jp.fujitsu.com>
To: balbir@linux.vnet.ibm.com
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
Nikanth Karthikesan <knikanth@suse.de>,
containers@lists.linux-foundation.org, xemul@openvz.org,
linux-mm@kvack.org, nikanth@gmail.com
Subject: Re: [PATCH] Unused check for thread group leader inmem_cgroup_move_task
Date: Thu, 4 Dec 2008 01:08:12 +0900 (JST) [thread overview]
Message-ID: <16817.10.75.179.62.1228320492.squirrel@webmail-b.css.fujitsu.com> (raw)
In-Reply-To: <20081203134024.GD17701@balbir.in.ibm.com>
Balbir Singh said:
>> On Mon, 1 Dec 2008 09:51:35 +0530
>> Nikanth Karthikesan <knikanth@suse.de> wrote:
>>
>> > Ok. Then should we remove the unused code which simply checks for
>> thread group
>> > leader but does nothing?
>> >
>> > Thanks
>> > Nikanth
>> >
>> Hmm, it seem that code is obsolete. thanks.
>> Balbir, how do you think ?
>>
>> Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
>>
>> Anyway we have to visit here, again.
>
> Sorry, I did not review this patch. The correct thing was nikanth did
> at first, move this to can_attach(). Why would we allow threads to
> exist in different groups, but still mark them as being accounted to
> the thread group leader.
>
Considering following case,
# mount -t cgroup none /cgroup -t memory,cpuset
# mkdir /cgroup/grpA/
# echo 1 > /cgroup/grpA/memory.use_hierarchy
# echo 1G > /cgroup/grpA/memory.limit_in_bytes
# mkdir /cgroup/grpA/01
# mkdir /cgroup/grpA/02
limit grpA/01's cpu to 0
limit grpA/02's cpu to 1
Run multithread program under grpA and move threads to grpA/01, grpA/02
if necessary to bind cpu.
Your "hierarchy" added this kind of flexibility and this is very useful.
And, of course, cgroup generic interface allows per-thread group attaching.
This is why I changed my mind and agreed to handle hierarchy management
under the kernel.
This can be an answer for use case to explain why thread-leader-check is
bad ? If we add limitation as "memcgroup should be mounted without
others",
And, if we only allows attaching thread-group-leader, how to migrate
multi-threaded program's all thread ?
I'm sorry I misunderstand something.
-Kame
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
prev parent reply other threads:[~2008-12-03 16:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-29 7:29 [PATCH] Unused check for thread group leader in mem_cgroup_move_task Nikanth Karthikesan
2008-12-01 1:12 ` KAMEZAWA Hiroyuki
2008-12-01 4:21 ` Nikanth Karthikesan
2008-12-01 4:30 ` KAMEZAWA Hiroyuki
2008-12-03 13:40 ` Balbir Singh
2008-12-03 16:08 ` KAMEZAWA Hiroyuki [this message]
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=16817.10.75.179.62.1228320492.squirrel@webmail-b.css.fujitsu.com \
--to=kamezawa.hiroyu@jp.fujitsu.com \
--cc=balbir@linux.vnet.ibm.com \
--cc=containers@lists.linux-foundation.org \
--cc=knikanth@suse.de \
--cc=linux-mm@kvack.org \
--cc=nikanth@gmail.com \
--cc=xemul@openvz.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox