Lines Matching refs:cgroup

216 static int cgroup_apply_control(struct cgroup *cgrp);
217 static void cgroup_finalize_control(struct cgroup *cgrp, int ret);
220 static int cgroup_destroy_locked(struct cgroup *cgrp);
221 static struct cgroup_subsys_state *css_create(struct cgroup *cgrp,
226 struct cgroup *cgrp, struct cftype cfts[],
298 bool cgroup_on_dfl(const struct cgroup *cgrp) in cgroup_on_dfl()
334 static bool cgroup_has_tasks(struct cgroup *cgrp) in cgroup_has_tasks()
339 bool cgroup_is_threaded(struct cgroup *cgrp) in cgroup_is_threaded()
345 static bool cgroup_is_mixable(struct cgroup *cgrp) in cgroup_is_mixable()
356 static bool cgroup_can_be_thread_root(struct cgroup *cgrp) in cgroup_can_be_thread_root()
378 bool cgroup_is_thread_root(struct cgroup *cgrp) in cgroup_is_thread_root()
400 static bool cgroup_is_valid_domain(struct cgroup *cgrp) in cgroup_is_valid_domain()
418 static u16 cgroup_control(struct cgroup *cgrp) in cgroup_control()
420 struct cgroup *parent = cgroup_parent(cgrp); in cgroup_control()
439 static u16 cgroup_ss_mask(struct cgroup *cgrp) in cgroup_ss_mask()
441 struct cgroup *parent = cgroup_parent(cgrp); in cgroup_ss_mask()
466 static struct cgroup_subsys_state *cgroup_css(struct cgroup *cgrp, in cgroup_css()
484 static struct cgroup_subsys_state *cgroup_tryget_css(struct cgroup *cgrp, in cgroup_tryget_css()
508 static struct cgroup_subsys_state *cgroup_e_css_by_mask(struct cgroup *cgrp, in cgroup_e_css_by_mask()
542 struct cgroup_subsys_state *cgroup_e_css(struct cgroup *cgrp, in cgroup_e_css()
569 struct cgroup_subsys_state *cgroup_get_e_css(struct cgroup *cgrp, in cgroup_get_e_css()
591 static void cgroup_get_live(struct cgroup *cgrp) in cgroup_get_live()
602 int __cgroup_task_count(const struct cgroup *cgrp) in __cgroup_task_count()
619 int cgroup_task_count(const struct cgroup *cgrp) in cgroup_task_count()
632 struct cgroup *cgrp = of->kn->parent->priv; in of_css()
716 (dsct) = (d_css)->cgroup; \
725 (dsct) = (d_css)->cgroup; \
798 static void cgroup_update_populated(struct cgroup *cgrp, bool populated) in cgroup_update_populated()
800 struct cgroup *child = NULL; in cgroup_update_populated()
983 struct cgroup *new_cgrp, in compare_css_sets()
986 struct cgroup *new_dfl_cgrp; in compare_css_sets()
1017 struct cgroup *cgrp1, *cgrp2; in compare_css_sets()
1061 struct cgroup *cgrp, in find_existing_css_set()
1147 struct cgroup *cgrp) in link_css_set()
1180 struct cgroup *cgrp) in find_css_set()
1232 struct cgroup *c = link->cgrp; in find_css_set()
1251 &css->cgroup->e_csets[ssid]); in find_css_set()
1284 struct cgroup *root_cgrp = kf_root->kn->priv; in cgroup_root_from_kf()
1320 struct cgroup *cgrp = &root->cgrp; in cgroup_destroy_root()
1364 static struct cgroup *
1367 struct cgroup *res = NULL; in current_cgns_cgroup_from_root()
1381 struct cgroup *c = link->cgrp; in current_cgns_cgroup_from_root()
1396 static struct cgroup *cset_cgroup_from_root(struct css_set *cset, in cset_cgroup_from_root()
1399 struct cgroup *res = NULL; in cset_cgroup_from_root()
1412 struct cgroup *c = link->cgrp; in cset_cgroup_from_root()
1429 struct cgroup *task_cgroup_from_root(struct task_struct *task, in task_cgroup_from_root()
1468 static char *cgroup_file_name(struct cgroup *cgrp, const struct cftype *cft, in cgroup_file_name()
1565 struct cgroup *cgrp; in cgroup_kn_unlock()
1595 struct cgroup *cgroup_kn_lock_live(struct kernfs_node *kn, bool drain_offline) in cgroup_kn_lock_live()
1597 struct cgroup *cgrp; in cgroup_kn_lock_live()
1626 static void cgroup_rm_file(struct cgroup *cgrp, const struct cftype *cft) in cgroup_rm_file()
1652 struct cgroup *cgrp = css->cgroup; in css_clear_dir()
1681 struct cgroup *cgrp = css->cgroup; in css_populate_dir()
1721 struct cgroup *dcgrp = &dst_root->cgrp; in rebind_subsystems()
1744 struct cgroup *scgrp = &src_root->cgrp; in rebind_subsystems()
1759 css->cgroup = dcgrp; in rebind_subsystems()
1795 struct cgroup *ns_cgroup; in cgroup_show_path()
1945 static void init_cgroup_housekeeping(struct cgroup *cgrp) in init_cgroup_housekeeping()
1955 cgrp->self.cgroup = cgrp; in init_cgroup_housekeeping()
1973 struct cgroup *cgrp = &root->cgrp; in init_cgroup_root()
1993 struct cgroup *root_cgrp = &root->cgrp; in cgroup_setup_root()
2110 struct cgroup *cgrp; in cgroup_do_get_tree()
2290 int cgroup_path_ns_locked(struct cgroup *cgrp, char *buf, size_t buflen, in cgroup_path_ns_locked()
2293 struct cgroup *root = cset_cgroup_from_root(ns->root_cset, cgrp->root); in cgroup_path_ns_locked()
2298 int cgroup_path_ns(struct cgroup *cgrp, char *buf, size_t buflen, in cgroup_path_ns()
2331 struct cgroup *cgrp; in task_cgroup_path()
2572 int cgroup_migrate_vet_dst(struct cgroup *dst_cgrp) in cgroup_migrate_vet_dst()
2647 struct cgroup *dst_cgrp, in cgroup_migrate_add_src()
2650 struct cgroup *src_cgrp; in cgroup_migrate_add_src()
2792 int cgroup_attach_task(struct cgroup *dst_cgrp, struct task_struct *leader, in cgroup_attach_task()
2908 struct cgroup *cgrp = seq_css(seq)->cgroup; in cgroup_controllers_show()
2917 struct cgroup *cgrp = seq_css(seq)->cgroup; in cgroup_subtree_control_show()
2932 static int cgroup_update_dfl_csses(struct cgroup *cgrp) in cgroup_update_dfl_csses()
2936 struct cgroup *dsct; in cgroup_update_dfl_csses()
2984 void cgroup_lock_and_drain_offline(struct cgroup *cgrp) in cgroup_lock_and_drain_offline()
2987 struct cgroup *dsct; in cgroup_lock_and_drain_offline()
3025 static void cgroup_save_control(struct cgroup *cgrp) in cgroup_save_control()
3027 struct cgroup *dsct; in cgroup_save_control()
3045 static void cgroup_propagate_control(struct cgroup *cgrp) in cgroup_propagate_control()
3047 struct cgroup *dsct; in cgroup_propagate_control()
3066 static void cgroup_restore_control(struct cgroup *cgrp) in cgroup_restore_control()
3068 struct cgroup *dsct; in cgroup_restore_control()
3081 struct cgroup *cgrp = css->cgroup; in css_visible()
3103 static int cgroup_apply_control_enable(struct cgroup *cgrp) in cgroup_apply_control_enable()
3105 struct cgroup *dsct; in cgroup_apply_control_enable()
3149 static void cgroup_apply_control_disable(struct cgroup *cgrp) in cgroup_apply_control_disable()
3151 struct cgroup *dsct; in cgroup_apply_control_disable()
3194 static int cgroup_apply_control(struct cgroup *cgrp) in cgroup_apply_control()
3223 static void cgroup_finalize_control(struct cgroup *cgrp, int ret) in cgroup_finalize_control()
3233 static int cgroup_vet_subtree_control_enable(struct cgroup *cgrp, u16 enable) in cgroup_vet_subtree_control_enable()
3279 struct cgroup *cgrp, *child; in cgroup_subtree_control_write()
3378 static int cgroup_enable_threaded(struct cgroup *cgrp) in cgroup_enable_threaded()
3380 struct cgroup *parent = cgroup_parent(cgrp); in cgroup_enable_threaded()
3381 struct cgroup *dom_cgrp = parent->dom_cgrp; in cgroup_enable_threaded()
3382 struct cgroup *dsct; in cgroup_enable_threaded()
3427 struct cgroup *cgrp = seq_css(seq)->cgroup; in cgroup_type_show()
3444 struct cgroup *cgrp; in cgroup_type_write()
3464 struct cgroup *cgrp = seq_css(seq)->cgroup; in cgroup_max_descendants_show()
3478 struct cgroup *cgrp; in cgroup_max_descendants_write()
3507 struct cgroup *cgrp = seq_css(seq)->cgroup; in cgroup_max_depth_show()
3521 struct cgroup *cgrp; in cgroup_max_depth_write()
3550 struct cgroup *cgrp = seq_css(seq)->cgroup; in cgroup_events_show()
3560 struct cgroup *cgroup = seq_css(seq)->cgroup; in cgroup_stat_show() local
3563 cgroup->nr_descendants); in cgroup_stat_show()
3565 cgroup->nr_dying_descendants); in cgroup_stat_show()
3571 struct cgroup *cgrp, int ssid) in cgroup_extra_stat_show()
3591 struct cgroup __maybe_unused *cgrp = seq_css(seq)->cgroup; in cpu_stat_show()
3604 struct cgroup *cgroup = seq_css(seq)->cgroup; in cgroup_io_pressure_show() local
3605 struct psi_group *psi = cgroup->id == 1 ? &psi_system : &cgroup->psi; in cgroup_io_pressure_show()
3611 struct cgroup *cgroup = seq_css(seq)->cgroup; in cgroup_memory_pressure_show() local
3612 struct psi_group *psi = cgroup->id == 1 ? &psi_system : &cgroup->psi; in cgroup_memory_pressure_show()
3618 struct cgroup *cgroup = seq_css(seq)->cgroup; in cgroup_cpu_pressure_show() local
3619 struct psi_group *psi = cgroup->id == 1 ? &psi_system : &cgroup->psi; in cgroup_cpu_pressure_show()
3628 struct cgroup *cgrp; in cgroup_pressure_write()
3685 struct cgroup *cgrp = seq_css(seq)->cgroup; in cgroup_freeze_show()
3695 struct cgroup *cgrp; in cgroup_freeze_write()
3738 struct cgroup *cgrp = of->kn->parent->priv; in cgroup_file_write()
3868 static int cgroup_add_file(struct cgroup_subsys_state *css, struct cgroup *cgrp, in cgroup_add_file()
3917 struct cgroup *cgrp, struct cftype cfts[], in cgroup_addrm_files()
3957 struct cgroup *root = &ss->root->cgrp; in cgroup_apply_cftypes()
3965 struct cgroup *cgrp = css->cgroup; in cgroup_apply_cftypes()
4582 it->cset_pos = &css->cgroup->e_csets[css->ss->id]; in css_task_iter_start()
4584 it->cset_pos = &css->cgroup->cset_links; in css_task_iter_start()
4668 struct cgroup *cgrp = seq_css(s)->cgroup; in __cgroup_procs_start()
4694 struct cgroup *cgrp = seq_css(s)->cgroup; in cgroup_procs_start()
4715 static int cgroup_procs_write_permission(struct cgroup *src_cgrp, in cgroup_procs_write_permission()
4716 struct cgroup *dst_cgrp, in cgroup_procs_write_permission()
4720 struct cgroup *com_cgrp = src_cgrp; in cgroup_procs_write_permission()
4755 struct cgroup *src_cgrp, *dst_cgrp; in cgroup_procs_write()
4796 struct cgroup *src_cgrp, *dst_cgrp; in cgroup_threads_write()
4848 .file_offset = offsetof(struct cgroup, procs_file),
4877 .file_offset = offsetof(struct cgroup, events_file),
4958 struct cgroup *cgrp = css->cgroup; in css_free_rwork_fn()
5008 struct cgroup *cgrp = css->cgroup; in css_release_work_fn()
5026 struct cgroup *tcgrp; in css_release_work_fn()
5071 struct cgroup_subsys *ss, struct cgroup *cgrp) in init_and_link_css()
5078 css->cgroup = cgrp; in init_and_link_css()
5110 rcu_assign_pointer(css->cgroup->subsys[ss->id], css); in online_css()
5133 RCU_INIT_POINTER(css->cgroup->subsys[ss->id], NULL); in offline_css()
5135 wake_up_all(&css->cgroup->offline_waitq); in offline_css()
5147 static struct cgroup_subsys_state *css_create(struct cgroup *cgrp, in css_create()
5150 struct cgroup *parent = cgroup_parent(cgrp); in css_create()
5207 static struct cgroup *cgroup_create(struct cgroup *parent) in cgroup_create()
5210 struct cgroup *cgrp, *tcgrp; in cgroup_create()
5332 static bool cgroup_check_hierarchy_limits(struct cgroup *parent) in cgroup_check_hierarchy_limits()
5334 struct cgroup *cgroup; in cgroup_check_hierarchy_limits() local
5340 for (cgroup = parent; cgroup; cgroup = cgroup_parent(cgroup)) { in cgroup_check_hierarchy_limits()
5341 if (cgroup->nr_descendants >= cgroup->max_descendants) in cgroup_check_hierarchy_limits()
5344 if (level > cgroup->max_depth) in cgroup_check_hierarchy_limits()
5357 struct cgroup *parent, *cgrp; in cgroup_mkdir()
5522 static int cgroup_destroy_locked(struct cgroup *cgrp) in cgroup_destroy_locked()
5525 struct cgroup *tcgrp, *parent = cgroup_parent(cgrp); in cgroup_destroy_locked()
5596 struct cgroup *cgrp; in cgroup_rmdir()
5873 struct cgroup *cgrp; in proc_cgroup_show()
6192 struct cgroup *cgrp; in css_tryget_online_from_dir()
6240 struct cgroup *cgroup_get_from_path(const char *path) in cgroup_get_from_path()
6243 struct cgroup *cgrp; in cgroup_get_from_path()
6274 struct cgroup *cgroup_get_from_fd(int fd) in cgroup_get_from_fd()
6277 struct cgroup *cgrp; in cgroup_get_from_fd()
6289 cgrp = css->cgroup; in cgroup_get_from_fd()
6402 struct cgroup *cgrp = sock_cgroup_ptr(skcd); in cgroup_sk_free()
6411 int cgroup_bpf_attach(struct cgroup *cgrp, struct bpf_prog *prog, in cgroup_bpf_attach()
6421 int cgroup_bpf_detach(struct cgroup *cgrp, struct bpf_prog *prog, in cgroup_bpf_detach()
6431 int cgroup_bpf_query(struct cgroup *cgrp, const union bpf_attr *attr, in cgroup_bpf_query()