Lines Matching refs:cgroup
220 static int cgroup_destroy_locked(struct cgroup *cgrp);
221 static int create_css(struct cgroup *cgrp, struct cgroup_subsys *ss,
226 struct cgroup *cgrp, struct cftype cfts[],
295 static bool cgroup_on_dfl(const struct cgroup *cgrp) in cgroup_on_dfl()
331 static struct cgroup *cgroup_parent(struct cgroup *cgrp) in cgroup_parent()
336 return container_of(parent_css, struct cgroup, self); in cgroup_parent()
351 static struct cgroup_subsys_state *cgroup_css(struct cgroup *cgrp, in cgroup_css()
371 static struct cgroup_subsys_state *cgroup_e_css(struct cgroup *cgrp, in cgroup_e_css()
404 struct cgroup_subsys_state *cgroup_get_e_css(struct cgroup *cgrp, in cgroup_get_e_css()
427 static inline bool cgroup_is_dead(const struct cgroup *cgrp) in cgroup_is_dead()
432 static void cgroup_get(struct cgroup *cgrp) in cgroup_get()
438 static bool cgroup_tryget(struct cgroup *cgrp) in cgroup_tryget()
443 static void cgroup_put(struct cgroup *cgrp) in cgroup_put()
450 struct cgroup *cgrp = of->kn->parent->priv; in of_css()
477 bool cgroup_is_descendant(struct cgroup *cgrp, struct cgroup *ancestor) in cgroup_is_descendant()
487 static int notify_on_release(const struct cgroup *cgrp) in notify_on_release()
561 static void check_for_release(struct cgroup *cgrp);
573 struct cgroup *cgrp;
629 static void cgroup_update_populated(struct cgroup *cgrp, bool populated) in cgroup_update_populated()
817 struct cgroup *new_cgrp, in compare_css_sets()
840 struct cgroup *cgrp1, *cgrp2; in compare_css_sets()
884 struct cgroup *cgrp, in find_existing_css_set()
970 struct cgroup *cgrp) in link_css_set()
1003 struct cgroup *cgrp) in find_css_set()
1052 struct cgroup *c = link->cgrp; in find_css_set()
1071 &css->cgroup->e_csets[ssid]); in find_css_set()
1082 struct cgroup *root_cgrp = kf_root->kn->priv; in cgroup_root_from_kf()
1124 struct cgroup *cgrp = &root->cgrp; in cgroup_destroy_root()
1163 static struct cgroup *cset_cgroup_from_root(struct css_set *cset, in cset_cgroup_from_root()
1166 struct cgroup *res = NULL; in cset_cgroup_from_root()
1177 struct cgroup *c = link->cgrp; in cset_cgroup_from_root()
1194 static struct cgroup *task_cgroup_from_root(struct task_struct *task, in task_cgroup_from_root()
1234 static char *cgroup_file_name(struct cgroup *cgrp, const struct cftype *cft, in cgroup_file_name()
1285 static unsigned long cgroup_calc_child_subsys_mask(struct cgroup *cgrp, in cgroup_calc_child_subsys_mask()
1288 struct cgroup *parent = cgroup_parent(cgrp); in cgroup_calc_child_subsys_mask()
1329 static void cgroup_refresh_child_subsys_mask(struct cgroup *cgrp) in cgroup_refresh_child_subsys_mask()
1347 struct cgroup *cgrp; in cgroup_kn_unlock()
1375 static struct cgroup *cgroup_kn_lock_live(struct kernfs_node *kn) in cgroup_kn_lock_live()
1377 struct cgroup *cgrp; in cgroup_kn_lock_live()
1403 static void cgroup_rm_file(struct cgroup *cgrp, const struct cftype *cft) in cgroup_rm_file()
1427 struct cgroup *cgrp_override) in css_clear_dir()
1429 struct cgroup *cgrp = cgrp_override ?: css->cgroup; in css_clear_dir()
1444 struct cgroup *cgrp_override) in css_populate_dir()
1446 struct cgroup *cgrp = cgrp_override ?: css->cgroup; in css_populate_dir()
1479 struct cgroup *dcgrp = &dst_root->cgrp; in rebind_subsystems()
1502 struct cgroup *scgrp = &ss->root->cgrp; in rebind_subsystems()
1538 struct cgroup *scgrp = &src_root->cgrp; in rebind_subsystems()
1549 css->cgroup = dcgrp; in rebind_subsystems()
1874 static void init_cgroup_housekeeping(struct cgroup *cgrp) in init_cgroup_housekeeping()
1884 cgrp->self.cgroup = cgrp; in init_cgroup_housekeeping()
1897 struct cgroup *cgrp = &root->cgrp; in init_cgroup_root()
1917 struct cgroup *root_cgrp = &root->cgrp; in cgroup_setup_root()
2210 struct cgroup *cgrp; in task_cgroup_path()
2375 struct cgroup *dst_cgrp) in cgroup_taskset_migrate()
2493 struct cgroup *dst_cgrp, in cgroup_migrate_add_src()
2496 struct cgroup *src_cgrp; in cgroup_migrate_add_src()
2539 static int cgroup_migrate_prepare_dst(struct cgroup *dst_cgrp, in cgroup_migrate_prepare_dst()
2613 struct cgroup *cgrp) in cgroup_migrate()
2645 static int cgroup_attach_task(struct cgroup *dst_cgrp, in cgroup_attach_task()
2675 struct cgroup *dst_cgrp, in cgroup_procs_write_permission()
2693 struct cgroup *cgrp; in cgroup_procs_write_permission()
2725 struct cgroup *cgrp; in __cgroup_procs_write()
2794 struct cgroup *from_cgrp; in cgroup_attach_task_all()
2828 struct cgroup *cgrp; in cgroup_release_agent_write()
2845 struct cgroup *cgrp = seq_css(seq)->cgroup; in cgroup_release_agent_show()
2879 struct cgroup *cgrp = seq_css(seq)->cgroup; in cgroup_root_controllers_show()
2889 struct cgroup *cgrp = seq_css(seq)->cgroup; in cgroup_controllers_show()
2898 struct cgroup *cgrp = seq_css(seq)->cgroup; in cgroup_subtree_control_show()
2913 static int cgroup_update_dfl_csses(struct cgroup *cgrp) in cgroup_update_dfl_csses()
2931 if (css->cgroup == cgrp) in cgroup_update_dfl_csses()
2934 list_for_each_entry(link, &css->cgroup->cset_links, cset_link) in cgroup_update_dfl_csses()
2973 struct cgroup *cgrp, *child; in cgroup_subtree_control_write()
3205 cgroup_is_populated(seq_css(seq)->cgroup)); in cgroup_events_show()
3212 struct cgroup *cgrp = of->kn->parent->priv; in cgroup_file_write()
3300 struct cgroup *cgrp = kn->priv; in cgroup_rename()
3348 static int cgroup_add_file(struct cgroup_subsys_state *css, struct cgroup *cgrp, in cgroup_add_file()
3393 struct cgroup *cgrp, struct cftype cfts[], in cgroup_addrm_files()
3433 struct cgroup *root = &ss->root->cgrp; in cgroup_apply_cftypes()
3441 struct cgroup *cgrp = css->cgroup; in cgroup_apply_cftypes()
3635 static int cgroup_task_count(const struct cgroup *cgrp) in cgroup_task_count()
3986 it->cset_pos = &css->cgroup->e_csets[css->ss->id]; in css_task_iter_start()
3988 it->cset_pos = &css->cgroup->cset_links; in css_task_iter_start()
4056 int cgroup_transfer_tasks(struct cgroup *to, struct cgroup *from) in cgroup_transfer_tasks()
4133 struct cgroup *owner;
4161 static void cgroup_pidlist_destroy_all(struct cgroup *cgrp) in cgroup_pidlist_destroy_all()
4254 static pid_t cgroup_pid_fry(struct cgroup *cgrp, pid_t pid) in cgroup_pid_fry()
4272 static struct cgroup_pidlist *cgroup_pidlist_find(struct cgroup *cgrp, in cgroup_pidlist_find()
4293 static struct cgroup_pidlist *cgroup_pidlist_find_create(struct cgroup *cgrp, in cgroup_pidlist_find_create()
4321 static int pidlist_array_load(struct cgroup *cgrp, enum cgroup_filetype type, in pidlist_array_load()
4392 struct cgroup *cgrp; in cgroupstats_build()
4460 struct cgroup *cgrp = seq_css(s)->cgroup; in cgroup_pidlist_start()
4520 mutex_unlock(&seq_css(s)->cgroup->pidlist_mutex); in cgroup_pidlist_stop()
4537 *pos = cgroup_pid_fry(seq_css(s)->cgroup, *p); in cgroup_pidlist_next()
4552 return notify_on_release(css->cgroup); in cgroup_read_notify_on_release()
4559 set_bit(CGRP_NOTIFY_ON_RELEASE, &css->cgroup->flags); in cgroup_write_notify_on_release()
4561 clear_bit(CGRP_NOTIFY_ON_RELEASE, &css->cgroup->flags); in cgroup_write_notify_on_release()
4568 return test_bit(CGRP_CPUSET_CLONE_CHILDREN, &css->cgroup->flags); in cgroup_clone_children_read()
4575 set_bit(CGRP_CPUSET_CLONE_CHILDREN, &css->cgroup->flags); in cgroup_clone_children_write()
4577 clear_bit(CGRP_CPUSET_CLONE_CHILDREN, &css->cgroup->flags); in cgroup_clone_children_write()
4585 .file_offset = offsetof(struct cgroup, procs_file),
4611 .file_offset = offsetof(struct cgroup, events_file),
4689 struct cgroup *cgrp = css->cgroup; in css_free_work_fn()
4745 struct cgroup *cgrp = css->cgroup; in css_release_work_fn()
4787 struct cgroup_subsys *ss, struct cgroup *cgrp) in init_and_link_css()
4794 css->cgroup = cgrp; in init_and_link_css()
4821 rcu_assign_pointer(css->cgroup->subsys[ss->id], css); in online_css()
4844 RCU_INIT_POINTER(css->cgroup->subsys[ss->id], NULL); in offline_css()
4846 wake_up_all(&css->cgroup->offline_waitq); in offline_css()
4859 static int create_css(struct cgroup *cgrp, struct cgroup_subsys *ss, in create_css()
4862 struct cgroup *parent = cgroup_parent(cgrp); in create_css()
4924 struct cgroup *parent, *cgrp; in cgroup_mkdir()
5142 static int cgroup_destroy_locked(struct cgroup *cgrp) in cgroup_destroy_locked()
5199 struct cgroup *cgrp; in cgroup_rmdir()
5434 struct cgroup *cgrp; in proc_cgroup_show()
5717 static void check_for_release(struct cgroup *cgrp) in check_for_release()
5749 struct cgroup *cgrp = in cgroup_release_agent()
5750 container_of(work, struct cgroup, release_agent_work); in cgroup_release_agent()
5819 struct cgroup *cgrp; in css_tryget_online_from_dir()
5878 return cgroup_task_count(css->cgroup); in debug_taskcount_read()
5912 struct cgroup *c = link->cgrp; in current_css_set_cg_links_read()
5931 list_for_each_entry(link, &css->cgroup->cset_links, cset_link) { in cgroup_css_links_read()
5959 return (!cgroup_is_populated(css->cgroup) && in releasable_read()
5960 !css_has_online_children(&css->cgroup->self)); in releasable_read()