• Home
  • Raw
  • Download

Lines Matching refs:ss

238 					      struct cgroup_subsys *ss);
480 struct cgroup_subsys *ss) in cgroup_css() argument
482 if (ss) in cgroup_css()
483 return rcu_dereference_check(cgrp->subsys[ss->id], in cgroup_css()
498 struct cgroup_subsys *ss) in cgroup_tryget_css() argument
503 css = cgroup_css(cgrp, ss); in cgroup_tryget_css()
522 struct cgroup_subsys *ss) in cgroup_e_css_by_mask() argument
526 if (!ss) in cgroup_e_css_by_mask()
533 while (!(cgroup_ss_mask(cgrp) & (1 << ss->id))) { in cgroup_e_css_by_mask()
539 return cgroup_css(cgrp, ss); in cgroup_e_css_by_mask()
556 struct cgroup_subsys *ss) in cgroup_e_css() argument
561 css = cgroup_css(cgrp, ss); in cgroup_e_css()
568 return init_css_set.subsys[ss->id]; in cgroup_e_css()
583 struct cgroup_subsys *ss) in cgroup_get_e_css() argument
590 css = cgroup_css(cgrp, ss); in cgroup_get_e_css()
597 css = init_css_set.subsys[ss->id]; in cgroup_get_e_css()
656 if (cft->ss) in of_css()
657 return rcu_dereference_raw(cgrp->subsys[cft->ss->id]); in of_css()
702 #define do_each_subsys_mask(ss, ssid, ss_mask) do { \ argument
709 (ss) = cgroup_subsys[ssid]; \
939 struct cgroup_subsys *ss; in css_set_hash() local
942 for_each_subsys(ss, i) in css_set_hash()
952 struct cgroup_subsys *ss; in put_css_set_locked() local
963 for_each_subsys(ss, ssid) { in put_css_set_locked()
1080 struct cgroup_subsys *ss; in find_existing_css_set() local
1090 for_each_subsys(ss, i) { in find_existing_css_set()
1096 template[i] = cgroup_e_css_by_mask(cgrp, ss); in find_existing_css_set()
1202 struct cgroup_subsys *ss; in find_css_set() local
1266 for_each_subsys(ss, ssid) { in find_css_set()
1488 struct cgroup_subsys *ss = cft->ss; in cgroup_file_name() local
1490 if (cft->ss && !(cft->flags & CFTYPE_NO_PREFIX) && in cgroup_file_name()
1495 dbg, cgroup_on_dfl(cgrp) ? ss->name : ss->legacy_name, in cgroup_file_name()
1541 struct cgroup_subsys *ss; in cgroup_calc_subtree_ss_mask() local
1551 do_each_subsys_mask(ss, ssid, cur_ss_mask) { in cgroup_calc_subtree_ss_mask()
1552 new_ss_mask |= ss->depends_on; in cgroup_calc_subtree_ss_mask()
1650 struct cgroup_subsys_state *css = cgroup_css(cgrp, cft->ss); in cgroup_rm_file()
1677 if (!css->ss) { in css_clear_dir()
1685 list_for_each_entry(cfts, &css->ss->cfts, node) in css_clear_dir()
1705 if (!css->ss) { in css_populate_dir()
1715 list_for_each_entry(cfts, &css->ss->cfts, node) { in css_populate_dir()
1728 list_for_each_entry(cfts, &css->ss->cfts, node) { in css_populate_dir()
1739 struct cgroup_subsys *ss; in rebind_subsystems() local
1745 do_each_subsys_mask(ss, ssid, ss_mask) { in rebind_subsystems()
1751 if (css_next_child(NULL, cgroup_css(&ss->root->cgrp, ss)) && in rebind_subsystems()
1752 !ss->implicit_on_dfl) in rebind_subsystems()
1756 if (ss->root != &cgrp_dfl_root && dst_root != &cgrp_dfl_root) in rebind_subsystems()
1763 if (ss->root == &cgrp_dfl_root) in rebind_subsystems()
1780 do_each_subsys_mask(ss, ssid, ss_mask) { in rebind_subsystems()
1781 struct cgroup_root *src_root = ss->root; in rebind_subsystems()
1783 struct cgroup_subsys_state *css = cgroup_css(scgrp, ss); in rebind_subsystems()
1787 WARN_ON(!css || cgroup_css(dcgrp, ss)); in rebind_subsystems()
1799 ss->root = dst_root; in rebind_subsystems()
1803 WARN_ON(!list_empty(&dcgrp->e_csets[ss->id])); in rebind_subsystems()
1804 list_for_each_entry_safe(cset, cset_pos, &scgrp->e_csets[ss->id], in rebind_subsystems()
1805 e_cset_node[ss->id]) { in rebind_subsystems()
1806 list_move_tail(&cset->e_cset_node[ss->id], in rebind_subsystems()
1807 &dcgrp->e_csets[ss->id]); in rebind_subsystems()
1816 if (it->cset_head == &scgrp->e_csets[ss->id]) in rebind_subsystems()
1817 it->cset_head = &dcgrp->e_csets[ss->id]; in rebind_subsystems()
1833 ss->name, ret); in rebind_subsystems()
1835 if (ss->bind) in rebind_subsystems()
1836 ss->bind(css); in rebind_subsystems()
1949 struct cgroup_subsys *ss; in init_cgroup_housekeeping() local
1965 for_each_subsys(ss, ssid) in init_cgroup_housekeeping()
2502 struct cgroup_subsys *ss; in cgroup_migrate_execute() local
2509 do_each_subsys_mask(ss, ssid, mgctx->ss_mask) { in cgroup_migrate_execute()
2510 if (ss->can_attach) { in cgroup_migrate_execute()
2512 ret = ss->can_attach(tset); in cgroup_migrate_execute()
2556 do_each_subsys_mask(ss, ssid, mgctx->ss_mask) { in cgroup_migrate_execute()
2557 if (ss->attach) { in cgroup_migrate_execute()
2559 trace_android_vh_cgroup_attach(ss, tset); in cgroup_migrate_execute()
2560 ss->attach(tset); in cgroup_migrate_execute()
2570 do_each_subsys_mask(ss, ssid, mgctx->ss_mask) { in cgroup_migrate_execute()
2573 if (ss->cancel_attach) { in cgroup_migrate_execute()
2575 ss->cancel_attach(tset); in cgroup_migrate_execute()
2748 struct cgroup_subsys *ss; in cgroup_migrate_prepare_dst() local
2780 for_each_subsys(ss, ssid) in cgroup_migrate_prepare_dst()
2934 struct cgroup_subsys *ss; in cgroup_procs_write_finish() local
2942 for_each_subsys(ss, ssid) in cgroup_procs_write_finish()
2943 if (ss->post_attach) in cgroup_procs_write_finish()
2944 ss->post_attach(); in cgroup_procs_write_finish()
2949 struct cgroup_subsys *ss; in cgroup_print_ss_mask() local
2953 do_each_subsys_mask(ss, ssid, ss_mask) { in cgroup_print_ss_mask()
2956 seq_puts(seq, ss->name); in cgroup_print_ss_mask()
3056 struct cgroup_subsys *ss; in cgroup_lock_and_drain_offline() local
3063 for_each_subsys(ss, ssid) { in cgroup_lock_and_drain_offline()
3064 struct cgroup_subsys_state *css = cgroup_css(dsct, ss); in cgroup_lock_and_drain_offline()
3147 struct cgroup_subsys *ss = css->ss; in css_visible() local
3150 if (cgroup_control(cgrp) & (1 << ss->id)) in css_visible()
3152 if (!(cgroup_ss_mask(cgrp) & (1 << ss->id))) in css_visible()
3154 return cgroup_on_dfl(cgrp) && ss->implicit_on_dfl; in css_visible()
3174 struct cgroup_subsys *ss; in cgroup_apply_control_enable() local
3178 for_each_subsys(ss, ssid) { in cgroup_apply_control_enable()
3179 struct cgroup_subsys_state *css = cgroup_css(dsct, ss); in cgroup_apply_control_enable()
3181 if (!(cgroup_ss_mask(dsct) & (1 << ss->id))) in cgroup_apply_control_enable()
3185 css = css_create(dsct, ss); in cgroup_apply_control_enable()
3220 struct cgroup_subsys *ss; in cgroup_apply_control_disable() local
3224 for_each_subsys(ss, ssid) { in cgroup_apply_control_disable()
3225 struct cgroup_subsys_state *css = cgroup_css(dsct, ss); in cgroup_apply_control_disable()
3233 !(cgroup_ss_mask(dsct) & (1 << ss->id))) { in cgroup_apply_control_disable()
3237 if (ss->css_reset) in cgroup_apply_control_disable()
3238 ss->css_reset(css); in cgroup_apply_control_disable()
3347 struct cgroup_subsys *ss; in cgroup_subtree_control_write() local
3359 do_each_subsys_mask(ss, ssid, ~cgrp_dfl_inhibit_ss_mask) { in cgroup_subtree_control_write()
3361 strcmp(tok + 1, ss->name)) in cgroup_subtree_control_write()
3383 for_each_subsys(ss, ssid) { in cgroup_subtree_control_write()
3641 struct cgroup_subsys *ss = cgroup_subsys[ssid]; in cgroup_extra_stat_show() local
3645 if (!ss->css_extra_stat_show) in cgroup_extra_stat_show()
3648 css = cgroup_tryget_css(cgrp, ss); in cgroup_extra_stat_show()
3652 ret = ss->css_extra_stat_show(seq, css); in cgroup_extra_stat_show()
3877 css = cgroup_css(cgrp, cft->ss); in cgroup_file_write()
4071 struct cgroup_subsys *ss = cfts[0].ss; in cgroup_apply_cftypes() local
4072 struct cgroup *root = &ss->root->cgrp; in cgroup_apply_cftypes()
4079 css_for_each_descendant_pre(css, cgroup_css(root, ss)) { in cgroup_apply_cftypes()
4104 cft->ss = NULL; in cgroup_exit_cftypes()
4111 static int cgroup_init_cftypes(struct cgroup_subsys *ss, struct cftype *cfts) in cgroup_init_cftypes() argument
4118 WARN_ON(cft->ss || cft->kf_ops); in cgroup_init_cftypes()
4142 cft->ss = ss; in cgroup_init_cftypes()
4152 if (!cfts || !cfts[0].ss) in cgroup_rm_cftypes_locked()
4196 static int cgroup_add_cftypes(struct cgroup_subsys *ss, struct cftype *cfts) in cgroup_add_cftypes() argument
4200 if (!cgroup_ssid_enabled(ss->id)) in cgroup_add_cftypes()
4206 ret = cgroup_init_cftypes(ss, cfts); in cgroup_add_cftypes()
4212 list_add_tail(&cfts->node, &ss->cfts); in cgroup_add_cftypes()
4229 int cgroup_add_dfl_cftypes(struct cgroup_subsys *ss, struct cftype *cfts) in cgroup_add_dfl_cftypes() argument
4235 return cgroup_add_cftypes(ss, cfts); in cgroup_add_dfl_cftypes()
4247 int cgroup_add_legacy_cftypes(struct cgroup_subsys *ss, struct cftype *cfts) in cgroup_add_legacy_cftypes() argument
4253 return cgroup_add_cftypes(ss, cfts); in cgroup_add_legacy_cftypes()
4541 if (it->ss) { in css_task_iter_next_css_set()
4542 cset = container_of(l, struct css_set, e_cset_node[it->ss->id]); in css_task_iter_next_css_set()
4701 it->ss = css->ss; in css_task_iter_start()
4704 if (it->ss) in css_task_iter_start()
4705 it->cset_pos = &css->cgroup->e_csets[css->ss->id]; in css_task_iter_start()
5130 struct cgroup_subsys *ss = css->ss; in css_free_rwork_fn() local
5135 if (ss) { in css_free_rwork_fn()
5140 ss->css_free(css); in css_free_rwork_fn()
5141 cgroup_idr_remove(&ss->css_idr, id); in css_free_rwork_fn()
5180 struct cgroup_subsys *ss = css->ss; in css_release_work_fn() local
5188 if (ss) { in css_release_work_fn()
5195 cgroup_idr_replace(&ss->css_idr, NULL, css->id); in css_release_work_fn()
5196 if (ss->css_released) in css_release_work_fn()
5197 ss->css_released(css); in css_release_work_fn()
5241 struct cgroup_subsys *ss, struct cgroup *cgrp) in init_and_link_css() argument
5249 css->ss = ss; in init_and_link_css()
5258 css->parent = cgroup_css(cgroup_parent(cgrp), ss); in init_and_link_css()
5262 if (cgroup_on_dfl(cgrp) && ss->css_rstat_flush) in init_and_link_css()
5265 BUG_ON(cgroup_css(cgrp, ss)); in init_and_link_css()
5271 struct cgroup_subsys *ss = css->ss; in online_css() local
5276 if (ss->css_online) in online_css()
5277 ret = ss->css_online(css); in online_css()
5280 rcu_assign_pointer(css->cgroup->subsys[ss->id], css); in online_css()
5292 struct cgroup_subsys *ss = css->ss; in offline_css() local
5299 if (ss->css_offline) in offline_css()
5300 ss->css_offline(css); in offline_css()
5303 RCU_INIT_POINTER(css->cgroup->subsys[ss->id], NULL); in offline_css()
5318 struct cgroup_subsys *ss) in css_create() argument
5321 struct cgroup_subsys_state *parent_css = cgroup_css(parent, ss); in css_create()
5327 css = ss->css_alloc(parent_css); in css_create()
5333 init_and_link_css(css, ss, cgrp); in css_create()
5339 err = cgroup_idr_alloc(&ss->css_idr, NULL, 2, 0, GFP_KERNEL); in css_create()
5346 cgroup_idr_replace(&ss->css_idr, css, css->id); in css_create()
5352 if (ss->broken_hierarchy && !ss->warned_broken_hierarchy && in css_create()
5355 current->comm, current->pid, ss->name); in css_create()
5356 if (!strcmp(ss->name, "memory")) in css_create()
5358 ss->warned_broken_hierarchy = true; in css_create()
5773 static void __init cgroup_init_subsys(struct cgroup_subsys *ss, bool early) in cgroup_init_subsys() argument
5777 pr_debug("Initializing cgroup subsys %s\n", ss->name); in cgroup_init_subsys()
5781 idr_init(&ss->css_idr); in cgroup_init_subsys()
5782 INIT_LIST_HEAD(&ss->cfts); in cgroup_init_subsys()
5785 ss->root = &cgrp_dfl_root; in cgroup_init_subsys()
5786 css = ss->css_alloc(cgroup_css(&cgrp_dfl_root.cgrp, ss)); in cgroup_init_subsys()
5789 init_and_link_css(css, ss, &cgrp_dfl_root.cgrp); in cgroup_init_subsys()
5801 css->id = cgroup_idr_alloc(&ss->css_idr, css, 1, 2, GFP_KERNEL); in cgroup_init_subsys()
5809 init_css_set.subsys[ss->id] = css; in cgroup_init_subsys()
5811 have_fork_callback |= (bool)ss->fork << ss->id; in cgroup_init_subsys()
5812 have_exit_callback |= (bool)ss->exit << ss->id; in cgroup_init_subsys()
5813 have_release_callback |= (bool)ss->release << ss->id; in cgroup_init_subsys()
5814 have_canfork_callback |= (bool)ss->can_fork << ss->id; in cgroup_init_subsys()
5835 struct cgroup_subsys *ss; in cgroup_init_early() local
5844 for_each_subsys(ss, i) { in cgroup_init_early()
5845 WARN(!ss->css_alloc || !ss->css_free || ss->name || ss->id, in cgroup_init_early()
5847 i, cgroup_subsys_name[i], ss->css_alloc, ss->css_free, in cgroup_init_early()
5848 ss->id, ss->name); in cgroup_init_early()
5852 ss->id = i; in cgroup_init_early()
5853 ss->name = cgroup_subsys_name[i]; in cgroup_init_early()
5854 if (!ss->legacy_name) in cgroup_init_early()
5855 ss->legacy_name = cgroup_subsys_name[i]; in cgroup_init_early()
5857 if (ss->early_init) in cgroup_init_early()
5858 cgroup_init_subsys(ss, true); in cgroup_init_early()
5871 struct cgroup_subsys *ss; in cgroup_init() local
5901 for_each_subsys(ss, ssid) { in cgroup_init()
5902 if (ss->early_init) { in cgroup_init()
5904 init_css_set.subsys[ss->id]; in cgroup_init()
5906 css->id = cgroup_idr_alloc(&ss->css_idr, css, 1, 2, in cgroup_init()
5910 cgroup_init_subsys(ss, false); in cgroup_init()
5926 ss->name); in cgroup_init()
5928 cgrp_dfl_root.subsys_mask |= 1 << ss->id; in cgroup_init()
5931 WARN_ON(ss->implicit_on_dfl && !ss->threaded); in cgroup_init()
5933 if (ss->implicit_on_dfl) in cgroup_init()
5934 cgrp_dfl_implicit_ss_mask |= 1 << ss->id; in cgroup_init()
5935 else if (!ss->dfl_cftypes) in cgroup_init()
5936 cgrp_dfl_inhibit_ss_mask |= 1 << ss->id; in cgroup_init()
5938 if (ss->threaded) in cgroup_init()
5939 cgrp_dfl_threaded_ss_mask |= 1 << ss->id; in cgroup_init()
5941 if (ss->dfl_cftypes == ss->legacy_cftypes) { in cgroup_init()
5942 WARN_ON(cgroup_add_cftypes(ss, ss->dfl_cftypes)); in cgroup_init()
5944 WARN_ON(cgroup_add_dfl_cftypes(ss, ss->dfl_cftypes)); in cgroup_init()
5945 WARN_ON(cgroup_add_legacy_cftypes(ss, ss->legacy_cftypes)); in cgroup_init()
5948 if (ss->bind) in cgroup_init()
5949 ss->bind(init_css_set.subsys[ssid]); in cgroup_init()
6020 struct cgroup_subsys *ss; in proc_cgroup_show() local
6029 for_each_subsys(ss, ssid) in proc_cgroup_show()
6032 ss->legacy_name); in proc_cgroup_show()
6247 struct cgroup_subsys *ss; in cgroup_can_fork() local
6254 do_each_subsys_mask(ss, i, have_canfork_callback) { in cgroup_can_fork()
6255 ret = ss->can_fork(child, kargs->cset); in cgroup_can_fork()
6263 for_each_subsys(ss, j) { in cgroup_can_fork()
6266 if (ss->cancel_fork) in cgroup_can_fork()
6267 ss->cancel_fork(child, kargs->cset); in cgroup_can_fork()
6287 struct cgroup_subsys *ss; in cgroup_cancel_fork() local
6290 for_each_subsys(ss, i) in cgroup_cancel_fork()
6291 if (ss->cancel_fork) in cgroup_cancel_fork()
6292 ss->cancel_fork(child, kargs->cset); in cgroup_cancel_fork()
6308 struct cgroup_subsys *ss; in cgroup_post_fork() local
6353 do_each_subsys_mask(ss, i, have_fork_callback) { in cgroup_post_fork()
6354 ss->fork(child); in cgroup_post_fork()
6378 struct cgroup_subsys *ss; in cgroup_exit() local
6400 do_each_subsys_mask(ss, i, have_exit_callback) { in cgroup_exit()
6401 ss->exit(tsk); in cgroup_exit()
6407 struct cgroup_subsys *ss; in cgroup_release() local
6410 do_each_subsys_mask(ss, ssid, have_release_callback) { in cgroup_release()
6411 ss->release(task); in cgroup_release()
6428 struct cgroup_subsys *ss; in cgroup_disable() local
6436 for_each_subsys(ss, i) { in cgroup_disable()
6437 if (strcmp(token, ss->name) && in cgroup_disable()
6438 strcmp(token, ss->legacy_name)) in cgroup_disable()
6443 ss->name); in cgroup_disable()
6479 struct cgroup_subsys *ss) in css_tryget_online_from_dir() argument
6500 css = cgroup_css(cgrp, ss); in css_tryget_online_from_dir()
6517 struct cgroup_subsys_state *css_from_id(int id, struct cgroup_subsys *ss) in css_from_id() argument
6520 return idr_find(&ss->css_idr, id); in css_from_id()
6770 struct cgroup_subsys *ss; in delegate_show() local
6777 for_each_subsys(ss, ssid) in delegate_show()
6778 ret += show_delegatable_files(ss->dfl_cftypes, buf + ret, in delegate_show()