RFC: Attaching threads to cgroups is OK?

Fernando Luis Vázquez Cao fernando at oss.ntt.co.jp
Tue Aug 19 05:52:14 PDT 2008

Hi Balbir, Kamezawa-san!

On Tue, 2008-08-19 at 17:57 +0530, Balbir Singh wrote:
> >> 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?
> >>
> > It's will be resitriction when io-controller reuse information of the owner
> > of memory. But if it's very clear who issues I/O (by tracking read/write
> > syscall), we may have chance to record the issuer of I/O to page_cgroup
> > struct. 
> We already do some tracking (at dirty time, IIRC) for task IO accounting. For
> the memory controller, tasks are virtually grouped by the mm_struct.
Thank you for your comments and the links.

When it comes to io-tracking such mm_struct-based grouping might not
desirable. If everyone agrees, we could try to decouple bio cgroup from
that memory controller-specific bits.

 - Fernando

More information about the Containers mailing list