All of lore.kernel.org
 help / color / mirror / Atom feed
* RFC: Attaching threads to cgroups is OK?
@ 2008-08-19 10:38 Takuya Yoshikawa
  2008-08-19 11:22 ` KAMEZAWA Hiroyuki
                   ` (2 more replies)
  0 siblings, 3 replies; 46+ messages in thread
From: Takuya Yoshikawa @ 2008-08-19 10:38 UTC (permalink / raw)
  To: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	virtualization-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA
  Cc: zquez Cao, =?ISO-8859-1?Q?Fernando_Luis_V=E1?=

Hi everyone,

I have a question about cgroup's policy concerning the treatment of 
threads. Please consider that we want to attach an application which has 
some threads already to a certain cgroup. If we echo the pid of this 
application to the "tasks" file connected to this cgroup the threads 
belonging to this application will NOT be moved to the new group. Is it 
right? If so, is it OK?

I mean, in the current implementation, threads created before the 
attachement of the parent process are not treated eaqually to those 
created after.

Could you tell me if you know something about the rules of attachement 
of pid, or tid, to cgroups? -- what ID is OK to write to "tasks" file 
and what we can expect as a result?


Tsuruta-san, how about your bio-cgroup's tracking concerning this?
If we want to use your tracking functions for each threads seperately, 
there seems to be a problem.
===cf. mm_get_bio_cgroup()===================
           owner
mm_struct ----> task_struct ----> bio_cgroup
=============================================
In my understanding, the mm_struct of a thread is same as its parent's.
So, even if we attach the TIDs of some threads to different cgroups the 
tracking always returns the same bio_cgroup -- its parent's group.
Do you have some policy about in which case we can use your tracking?

Thanks,
-- Takuya Yoshikawa

^ permalink raw reply	[flat|nested] 46+ messages in thread
* RFC: Attaching threads to cgroups is OK?
@ 2008-08-19 10:38 Takuya Yoshikawa
  0 siblings, 0 replies; 46+ messages in thread
From: Takuya Yoshikawa @ 2008-08-19 10:38 UTC (permalink / raw)
  To: containers, virtualization; +Cc: zquez Cao, =?ISO-8859-1?Q?Fernando_Luis_V=E1?=

Hi everyone,

I have a question about cgroup's policy concerning the treatment of 
threads. Please consider that we want to attach an application which has 
some threads already to a certain cgroup. If we echo the pid of this 
application to the "tasks" file connected to this cgroup the threads 
belonging to this application will NOT be moved to the new group. Is it 
right? If so, is it OK?

I mean, in the current implementation, threads created before the 
attachement of the parent process are not treated eaqually to those 
created after.

Could you tell me if you know something about the rules of attachement 
of pid, or tid, to cgroups? -- what ID is OK to write to "tasks" file 
and what we can expect as a result?


Tsuruta-san, how about your bio-cgroup's tracking concerning this?
If we want to use your tracking functions for each threads seperately, 
there seems to be a problem.
===cf. mm_get_bio_cgroup()===================
           owner
mm_struct ----> task_struct ----> bio_cgroup
=============================================
In my understanding, the mm_struct of a thread is same as its parent's.
So, even if we attach the TIDs of some threads to different cgroups the 
tracking always returns the same bio_cgroup -- its parent's group.
Do you have some policy about in which case we can use your tracking?

Thanks,
-- Takuya Yoshikawa

^ permalink raw reply	[flat|nested] 46+ messages in thread

end of thread, other threads:[~2008-09-12 18:57 UTC | newest]

Thread overview: 46+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-19 10:38 RFC: Attaching threads to cgroups is OK? Takuya Yoshikawa
2008-08-19 11:22 ` KAMEZAWA Hiroyuki
     [not found] ` <48AAA296.8050802-gVGce1chcLdL9jVzuh4AOg@public.gmane.org>
2008-08-19 11:22   ` KAMEZAWA Hiroyuki
2008-08-19 12:27     ` Balbir Singh
     [not found]     ` <20080819202237.edd75933.kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2008-08-19 12:27       ` Balbir Singh
2008-08-19 12:52         ` Fernando Luis Vázquez Cao
     [not found]         ` <48AABC31.7070207-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2008-08-19 12:52           ` Fernando Luis Vázquez Cao
2008-08-20  7:12             ` Hirokazu Takahashi
     [not found]             ` <1219150334.14590.12.camel-xpvPi5bcW5X5OjGIXfuPlhrrLbDL3r4M6qtp775pBPw@public.gmane.org>
2008-08-20  7:12               ` Hirokazu Takahashi
     [not found]                 ` <20080820.161247.64324924.taka-jCdQPDEk3idL9jVzuh4AOg@public.gmane.org>
2008-08-20  8:43                   ` KAMEZAWA Hiroyuki
2008-08-20  8:43                 ` KAMEZAWA Hiroyuki
     [not found]                   ` <20080820174334.a566a775.kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2008-08-22  1:03                     ` Takuya Yoshikawa
2008-08-22  1:03                   ` Takuya Yoshikawa
2008-08-20  5:52           ` Takuya Yoshikawa
2008-08-20  5:52         ` Takuya Yoshikawa
2008-08-20 11:48       ` Hirokazu Takahashi
2008-08-21  3:08         ` Fernando Luis Vázquez Cao
     [not found]         ` <20080820.204832.131207708.taka-jCdQPDEk3idL9jVzuh4AOg@public.gmane.org>
2008-08-21  3:08           ` Fernando Luis Vázquez Cao
     [not found]             ` <1219288081.28324.30.camel-xpvPi5bcW5X5OjGIXfuPlhrrLbDL3r4M6qtp775pBPw@public.gmane.org>
2008-08-21  3:32               ` Balbir Singh
2008-08-21  5:25                 ` Fernando Luis Vázquez Cao
     [not found]                 ` <48ACE1B4.8010000-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2008-08-21  5:25                   ` Fernando Luis Vázquez Cao
2008-08-21 10:28                     ` Balbir Singh
     [not found]                     ` <1219296306.28324.82.camel-xpvPi5bcW5X5OjGIXfuPlhrrLbDL3r4M6qtp775pBPw@public.gmane.org>
2008-08-21 10:28                       ` Balbir Singh
2008-08-22 18:55                       ` Vivek Goyal
2008-08-25 10:36                         ` Fernando Luis Vázquez Cao
2008-09-05 11:50                           ` Hirokazu Takahashi
     [not found]                           ` <1219660569.16371.161.camel-xpvPi5bcW5X5OjGIXfuPlhrrLbDL3r4M6qtp775pBPw@public.gmane.org>
2008-09-05 11:50                             ` Hirokazu Takahashi
2008-09-05 12:00                               ` Hirokazu Takahashi
     [not found]                               ` <20080905.205016.28412219.taka-jCdQPDEk3idL9jVzuh4AOg@public.gmane.org>
2008-09-05 12:00                                 ` Hirokazu Takahashi
2008-09-05 15:38                                   ` Vivek Goyal
2008-09-08  2:58                                     ` Takuya Yoshikawa
     [not found]                                     ` <20080905153832.GE13742-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2008-09-08  2:58                                       ` Takuya Yoshikawa
     [not found]                                         ` <48C494EB.4080502-gVGce1chcLdL9jVzuh4AOg@public.gmane.org>
2008-09-08 11:52                                           ` Hirokazu Takahashi
2008-09-08 11:52                                         ` Hirokazu Takahashi
2008-09-08 12:47                                       ` Hirokazu Takahashi
2008-09-08 12:47                                     ` Hirokazu Takahashi
     [not found]                                   ` <20080905.210017.44596963.taka-jCdQPDEk3idL9jVzuh4AOg@public.gmane.org>
2008-09-05 15:38                                     ` Vivek Goyal
     [not found]                         ` <20080822185527.GD27964-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2008-08-25 10:36                           ` Fernando Luis Vázquez Cao
2008-09-12 18:57                           ` Vivek Goyal
2008-09-12 18:57                         ` Vivek Goyal
2008-08-22 18:55                     ` Vivek Goyal
2008-08-21  3:32             ` Balbir Singh
2008-08-20 11:48     ` Hirokazu Takahashi
2008-08-20  7:41   ` Hirokazu Takahashi
2008-08-20  7:41 ` Hirokazu Takahashi
  -- strict thread matches above, loose matches on Subject: below --
2008-08-19 10:38 Takuya Yoshikawa

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.