Lines Matching refs:css
372 return &memcg->css; in mem_cgroup_css_from_page()
396 while (memcg && !(memcg->css.flags & CSS_ONLINE)) in page_cgroup_ino()
399 ino = cgroup_ino(memcg->css.cgroup); in page_cgroup_ino()
544 !css_tryget(&mz->memcg->css)) in __mem_cgroup_largest_soft_limit_node()
611 cgroup_rstat_updated(memcg->css.cgroup, smp_processor_id()); in memcg_rstat_updated()
635 cgroup_rstat_flush_irqsafe(root_mem_cgroup->css.cgroup); in __mem_cgroup_flush_stats()
1028 css_get(&memcg->css); in get_mem_cgroup_from_mm()
1041 } while (!css_tryget(&memcg->css)); in get_mem_cgroup_from_mm()
1082 struct cgroup_subsys_state *css = NULL; in mem_cgroup_iter() local
1111 if (!pos || css_tryget(&pos->css)) in mem_cgroup_iter()
1128 css = &pos->css; in mem_cgroup_iter()
1131 css = css_next_descendant_pre(css, &root->css); in mem_cgroup_iter()
1132 if (!css) { in mem_cgroup_iter()
1149 if (css == &root->css || css_tryget(css)) { in mem_cgroup_iter()
1150 memcg = mem_cgroup_from_css(css); in mem_cgroup_iter()
1164 css_put(&pos->css); in mem_cgroup_iter()
1173 css_put(&prev->css); in mem_cgroup_iter()
1189 css_put(&prev->css); in mem_cgroup_iter_break()
1252 css_task_iter_start(&iter->css, CSS_TASK_ITER_PROCS, &it); in mem_cgroup_scan_tasks()
1612 pr_cont_cgroup_path(memcg->css.cgroup); in mem_cgroup_print_oom_context()
1651 pr_cont_cgroup_path(memcg->css.cgroup); in mem_cgroup_print_oom_meminfo()
1920 css_get(&memcg->css); in mem_cgroup_oom()
2010 css_put(&memcg->css); in mem_cgroup_oom_synchronize()
2064 css_get(&oom_group->css); in mem_cgroup_get_oom_group()
2074 pr_cont_cgroup_path(memcg->css.cgroup); in mem_cgroup_print_oom_group()
2262 css_put(&old->css); in drain_stock()
2300 css_get(&memcg->css); in __refill_stock()
2624 css_put(&memcg->css); in mem_cgroup_handle_over_high()
3076 css_put(&memcg->css); in obj_cgroup_uncharge_pages()
3101 css_put(&memcg->css); in obj_cgroup_charge_pages()
3256 css_put(&memcg->css); in drain_obj_stock()
3417 css_get_many(&memcg->css, nr - 1); in split_page_memcg()
3576 css_put(&mz->memcg->css); in mem_cgroup_soft_limit_reclaim()
3589 css_put(&next_mz->memcg->css); in mem_cgroup_soft_limit_reclaim()
3631 static u64 mem_cgroup_hierarchy_read(struct cgroup_subsys_state *css, in mem_cgroup_hierarchy_read() argument
3637 static int mem_cgroup_hierarchy_write(struct cgroup_subsys_state *css, in mem_cgroup_hierarchy_write() argument
3677 static u64 mem_cgroup_read_u64(struct cgroup_subsys_state *css, in mem_cgroup_read_u64() argument
3680 struct mem_cgroup *memcg = mem_cgroup_from_css(css); in mem_cgroup_read_u64()
3901 static u64 mem_cgroup_move_charge_read(struct cgroup_subsys_state *css, in mem_cgroup_move_charge_read() argument
3904 return mem_cgroup_from_css(css)->move_charge_at_immigrate; in mem_cgroup_move_charge_read()
3908 static int mem_cgroup_move_charge_write(struct cgroup_subsys_state *css, in mem_cgroup_move_charge_write() argument
3911 struct mem_cgroup *memcg = mem_cgroup_from_css(css); in mem_cgroup_move_charge_write()
3926 static int mem_cgroup_move_charge_write(struct cgroup_subsys_state *css, in mem_cgroup_move_charge_write() argument
4144 static u64 mem_cgroup_swappiness_read(struct cgroup_subsys_state *css, in mem_cgroup_swappiness_read() argument
4147 struct mem_cgroup *memcg = mem_cgroup_from_css(css); in mem_cgroup_swappiness_read()
4152 static int mem_cgroup_swappiness_write(struct cgroup_subsys_state *css, in mem_cgroup_swappiness_write() argument
4155 struct mem_cgroup *memcg = mem_cgroup_from_css(css); in mem_cgroup_swappiness_write()
4504 static int mem_cgroup_oom_control_write(struct cgroup_subsys_state *css, in mem_cgroup_oom_control_write() argument
4507 struct mem_cgroup *memcg = mem_cgroup_from_css(css); in mem_cgroup_oom_control_write()
4543 if (!memcg->css.parent) in mem_cgroup_wb_domain()
4766 css_put(&memcg->css); in memcg_event_remove()
4828 struct cgroup_subsys_state *css = of_css(of); in memcg_write_event_control() local
4829 struct mem_cgroup *memcg = mem_cgroup_from_css(css); in memcg_write_event_control()
4936 if (cfile_css != css) { in memcg_write_event_control()
4957 css_put(css); in memcg_write_event_control()
5155 css_put(&memcg->css); in mem_cgroup_id_put_many()
5180 struct cgroup_subsys_state *css; in mem_cgroup_get_from_ino() local
5187 css = cgroup_get_e_css(cgrp, &memory_cgrp_subsys); in mem_cgroup_get_from_ino()
5188 if (css) in mem_cgroup_get_from_ino()
5189 memcg = container_of(css, struct mem_cgroup, css); in mem_cgroup_get_from_ino()
5350 return &memcg->css; in mem_cgroup_css_alloc()
5356 return &memcg->css; in mem_cgroup_css_alloc()
5359 static int mem_cgroup_css_online(struct cgroup_subsys_state *css) in mem_cgroup_css_online() argument
5361 struct mem_cgroup *memcg = mem_cgroup_from_css(css); in mem_cgroup_css_online()
5376 css_get(css); in mem_cgroup_css_online()
5389 static void mem_cgroup_css_offline(struct cgroup_subsys_state *css) in mem_cgroup_css_offline() argument
5391 struct mem_cgroup *memcg = mem_cgroup_from_css(css); in mem_cgroup_css_offline()
5418 static void mem_cgroup_css_released(struct cgroup_subsys_state *css) in mem_cgroup_css_released() argument
5420 struct mem_cgroup *memcg = mem_cgroup_from_css(css); in mem_cgroup_css_released()
5425 static void mem_cgroup_css_free(struct cgroup_subsys_state *css) in mem_cgroup_css_free() argument
5427 struct mem_cgroup *memcg = mem_cgroup_from_css(css); in mem_cgroup_css_free()
5460 static void mem_cgroup_css_reset(struct cgroup_subsys_state *css) in mem_cgroup_css_reset() argument
5462 struct mem_cgroup *memcg = mem_cgroup_from_css(css); in mem_cgroup_css_reset()
5476 static void mem_cgroup_css_rstat_flush(struct cgroup_subsys_state *css, int cpu) in mem_cgroup_css_rstat_flush() argument
5478 struct mem_cgroup *memcg = mem_cgroup_from_css(css); in mem_cgroup_css_rstat_flush()
5775 css_get(&to->css); in mem_cgroup_move_account()
5776 css_put(&from->css); in mem_cgroup_move_account()
6033 struct cgroup_subsys_state *css; in mem_cgroup_can_attach() local
6052 cgroup_taskset_for_each_leader(leader, css, tset) { in mem_cgroup_can_attach()
6055 memcg = mem_cgroup_from_css(css); in mem_cgroup_can_attach()
6280 struct cgroup_subsys_state *css; in mem_cgroup_attach() local
6283 cgroup_taskset_for_each_leader(task, css, tset) in mem_cgroup_attach()
6310 static u64 memory_current_read(struct cgroup_subsys_state *css, in memory_current_read() argument
6313 struct mem_cgroup *memcg = mem_cgroup_from_css(css); in memory_current_read()
6318 static u64 memory_peak_read(struct cgroup_subsys_state *css, in memory_peak_read() argument
6321 struct mem_cgroup *memcg = mem_cgroup_from_css(css); in memory_peak_read()
6894 css_get(&memcg->css); in charge_memcg()
6912 css_put(&memcg->css); in __mem_cgroup_charge()
6942 if (!memcg || !css_tryget_online(&memcg->css)) in mem_cgroup_swapin_charge_folio()
6948 css_put(&memcg->css); in mem_cgroup_swapin_charge_folio()
7018 css_put(&ug->memcg->css); in uncharge_batch()
7057 css_get(&memcg->css); in uncharge_folio()
7077 css_put(&memcg->css); in uncharge_folio()
7152 css_get(&memcg->css); in mem_cgroup_migrate()
7181 if (css_tryget(&memcg->css)) in mem_cgroup_sk_alloc()
7190 css_put(&sk->sk_memcg->css); in mem_cgroup_sk_free()
7388 css_put(&memcg->css); in mem_cgroup_swapout()
7518 static u64 swap_current_read(struct cgroup_subsys_state *css, in swap_current_read() argument
7521 struct mem_cgroup *memcg = mem_cgroup_from_css(css); in swap_current_read()
7674 cgroup_rstat_flush(memcg->css.cgroup); in obj_cgroup_may_zswap()
7736 static u64 zswap_current_read(struct cgroup_subsys_state *css, in zswap_current_read() argument
7739 cgroup_rstat_flush(css->cgroup); in zswap_current_read()
7740 return memcg_page_state(mem_cgroup_from_css(css), MEMCG_ZSWAP_B); in zswap_current_read()