Cgroup includes many css_set, and in the same way, one css_set can be included in many Cgroups. cg_cgroup_link is used to build this relationship. For example, the following 4 cg_cgroup_links are used to make all combinations with in cgroup1, cgroup2, css_sets1 and css_sets2. And, cgroup1 maintains list of all css_sets it includes and css_set maintains list of all cgroups it has been included using the same cg_cgroup_links structures.
/* Link structure for associating css_set objects with cgroups */
struct cg_cgroup_link {
/*
* List running through cg_cgroup_links associated with a
* cgroup, anchored on cgroup->css_sets
*/
struct list_head cgrp_link_list;
struct cgroup *cgrp;
/*
* List running through cg_cgroup_links pointing at a
* single css_set object, anchored on css_set->cg_links
*/
struct list_head cg_link_list;
struct css_set *cg;
};
No comments:
Post a Comment