Lines Matching refs:mz

404 static void __mem_cgroup_insert_exceeded(struct mem_cgroup_per_node *mz,  in __mem_cgroup_insert_exceeded()  argument
413 if (mz->on_tree) in __mem_cgroup_insert_exceeded()
416 mz->usage_in_excess = new_usage_in_excess; in __mem_cgroup_insert_exceeded()
417 if (!mz->usage_in_excess) in __mem_cgroup_insert_exceeded()
423 if (mz->usage_in_excess < mz_node->usage_in_excess) { in __mem_cgroup_insert_exceeded()
432 mctz->rb_rightmost = &mz->tree_node; in __mem_cgroup_insert_exceeded()
434 rb_link_node(&mz->tree_node, parent, p); in __mem_cgroup_insert_exceeded()
435 rb_insert_color(&mz->tree_node, &mctz->rb_root); in __mem_cgroup_insert_exceeded()
436 mz->on_tree = true; in __mem_cgroup_insert_exceeded()
439 static void __mem_cgroup_remove_exceeded(struct mem_cgroup_per_node *mz, in __mem_cgroup_remove_exceeded() argument
442 if (!mz->on_tree) in __mem_cgroup_remove_exceeded()
445 if (&mz->tree_node == mctz->rb_rightmost) in __mem_cgroup_remove_exceeded()
446 mctz->rb_rightmost = rb_prev(&mz->tree_node); in __mem_cgroup_remove_exceeded()
448 rb_erase(&mz->tree_node, &mctz->rb_root); in __mem_cgroup_remove_exceeded()
449 mz->on_tree = false; in __mem_cgroup_remove_exceeded()
452 static void mem_cgroup_remove_exceeded(struct mem_cgroup_per_node *mz, in mem_cgroup_remove_exceeded() argument
458 __mem_cgroup_remove_exceeded(mz, mctz); in mem_cgroup_remove_exceeded()
477 struct mem_cgroup_per_node *mz; in mem_cgroup_update_tree() local
488 mz = memcg->nodeinfo[nid]; in mem_cgroup_update_tree()
494 if (excess || mz->on_tree) { in mem_cgroup_update_tree()
499 if (mz->on_tree) in mem_cgroup_update_tree()
500 __mem_cgroup_remove_exceeded(mz, mctz); in mem_cgroup_update_tree()
505 __mem_cgroup_insert_exceeded(mz, mctz, excess); in mem_cgroup_update_tree()
514 struct mem_cgroup_per_node *mz; in mem_cgroup_remove_from_trees() local
518 mz = memcg->nodeinfo[nid]; in mem_cgroup_remove_from_trees()
521 mem_cgroup_remove_exceeded(mz, mctz); in mem_cgroup_remove_from_trees()
528 struct mem_cgroup_per_node *mz; in __mem_cgroup_largest_soft_limit_node() local
531 mz = NULL; in __mem_cgroup_largest_soft_limit_node()
535 mz = rb_entry(mctz->rb_rightmost, in __mem_cgroup_largest_soft_limit_node()
542 __mem_cgroup_remove_exceeded(mz, mctz); in __mem_cgroup_largest_soft_limit_node()
543 if (!soft_limit_excess(mz->memcg) || in __mem_cgroup_largest_soft_limit_node()
544 !css_tryget(&mz->memcg->css)) in __mem_cgroup_largest_soft_limit_node()
547 return mz; in __mem_cgroup_largest_soft_limit_node()
553 struct mem_cgroup_per_node *mz; in mem_cgroup_largest_soft_limit_node() local
556 mz = __mem_cgroup_largest_soft_limit_node(mctz); in mem_cgroup_largest_soft_limit_node()
558 return mz; in mem_cgroup_largest_soft_limit_node()
1095 struct mem_cgroup_per_node *mz; in mem_cgroup_iter() local
1097 mz = root->nodeinfo[reclaim->pgdat->node_id]; in mem_cgroup_iter()
1098 iter = &mz->iter; in mem_cgroup_iter()
1196 struct mem_cgroup_per_node *mz; in __invalidate_reclaim_iterators() local
1200 mz = from->nodeinfo[nid]; in __invalidate_reclaim_iterators()
1201 iter = &mz->iter; in __invalidate_reclaim_iterators()
1364 struct mem_cgroup_per_node *mz; in mem_cgroup_update_lru_size() local
1371 mz = container_of(lruvec, struct mem_cgroup_per_node, lruvec); in mem_cgroup_update_lru_size()
1372 lru_size = &mz->lru_zone_size[zid][lru]; in mem_cgroup_update_lru_size()
3519 struct mem_cgroup_per_node *mz, *next_mz = NULL; in mem_cgroup_soft_limit_reclaim() local
3545 mz = next_mz; in mem_cgroup_soft_limit_reclaim()
3547 mz = mem_cgroup_largest_soft_limit_node(mctz); in mem_cgroup_soft_limit_reclaim()
3548 if (!mz) in mem_cgroup_soft_limit_reclaim()
3551 reclaimed = mem_cgroup_soft_reclaim(mz->memcg, pgdat, in mem_cgroup_soft_limit_reclaim()
3564 excess = soft_limit_excess(mz->memcg); in mem_cgroup_soft_limit_reclaim()
3574 __mem_cgroup_insert_exceeded(mz, mctz, excess); in mem_cgroup_soft_limit_reclaim()
3576 css_put(&mz->memcg->css); in mem_cgroup_soft_limit_reclaim()
4126 struct mem_cgroup_per_node *mz; in memcg_stat_show() local
4131 mz = memcg->nodeinfo[pgdat->node_id]; in memcg_stat_show()
4133 anon_cost += mz->lruvec.anon_cost; in memcg_stat_show()
4134 file_cost += mz->lruvec.file_cost; in memcg_stat_show()