Lines Matching refs:iter
770 struct mem_cgroup_reclaim_iter *uninitialized_var(iter); in mem_cgroup_iter()
796 iter = &mz->iter[reclaim->priority]; in mem_cgroup_iter()
798 if (prev && reclaim->generation != iter->generation) in mem_cgroup_iter()
802 pos = READ_ONCE(iter->position); in mem_cgroup_iter()
813 (void)cmpxchg(&iter->position, pos, NULL); in mem_cgroup_iter()
856 (void)cmpxchg(&iter->position, pos, memcg); in mem_cgroup_iter()
862 iter->generation++; in mem_cgroup_iter()
864 reclaim->generation = iter->generation; in mem_cgroup_iter()
893 struct mem_cgroup_reclaim_iter *iter; in invalidate_reclaim_iterators() local
902 iter = &mz->iter[i]; in invalidate_reclaim_iterators()
903 cmpxchg(&iter->position, in invalidate_reclaim_iterators()
915 #define for_each_mem_cgroup_tree(iter, root) \ argument
916 for (iter = mem_cgroup_iter(root, NULL, NULL); \
917 iter != NULL; \
918 iter = mem_cgroup_iter(root, iter, NULL))
920 #define for_each_mem_cgroup(iter) \ argument
921 for (iter = mem_cgroup_iter(NULL, NULL, NULL); \
922 iter != NULL; \
923 iter = mem_cgroup_iter(NULL, iter, NULL))
941 struct mem_cgroup *iter; in mem_cgroup_scan_tasks() local
946 for_each_mem_cgroup_tree(iter, memcg) { in mem_cgroup_scan_tasks()
950 css_task_iter_start(&iter->css, &it); in mem_cgroup_scan_tasks()
955 mem_cgroup_iter_break(memcg, iter); in mem_cgroup_scan_tasks()
1154 struct mem_cgroup *iter; in mem_cgroup_print_oom_info() local
1182 for_each_mem_cgroup_tree(iter, memcg) { in mem_cgroup_print_oom_info()
1184 pr_cont_cgroup_path(iter->css.cgroup); in mem_cgroup_print_oom_info()
1191 K(mem_cgroup_read_stat(iter, i))); in mem_cgroup_print_oom_info()
1196 K(mem_cgroup_nr_lru_pages(iter, BIT(i)))); in mem_cgroup_print_oom_info()
1209 struct mem_cgroup *iter; in mem_cgroup_count_children() local
1211 for_each_mem_cgroup_tree(iter, memcg) in mem_cgroup_count_children()
1413 struct mem_cgroup *iter, *failed = NULL; in mem_cgroup_oom_trylock() local
1417 for_each_mem_cgroup_tree(iter, memcg) { in mem_cgroup_oom_trylock()
1418 if (iter->oom_lock) { in mem_cgroup_oom_trylock()
1423 failed = iter; in mem_cgroup_oom_trylock()
1424 mem_cgroup_iter_break(memcg, iter); in mem_cgroup_oom_trylock()
1427 iter->oom_lock = true; in mem_cgroup_oom_trylock()
1435 for_each_mem_cgroup_tree(iter, memcg) { in mem_cgroup_oom_trylock()
1436 if (iter == failed) { in mem_cgroup_oom_trylock()
1437 mem_cgroup_iter_break(memcg, iter); in mem_cgroup_oom_trylock()
1440 iter->oom_lock = false; in mem_cgroup_oom_trylock()
1452 struct mem_cgroup *iter; in mem_cgroup_oom_unlock() local
1456 for_each_mem_cgroup_tree(iter, memcg) in mem_cgroup_oom_unlock()
1457 iter->oom_lock = false; in mem_cgroup_oom_unlock()
1463 struct mem_cgroup *iter; in mem_cgroup_mark_under_oom() local
1466 for_each_mem_cgroup_tree(iter, memcg) in mem_cgroup_mark_under_oom()
1467 iter->under_oom++; in mem_cgroup_mark_under_oom()
1473 struct mem_cgroup *iter; in mem_cgroup_unmark_under_oom() local
1480 for_each_mem_cgroup_tree(iter, memcg) in mem_cgroup_unmark_under_oom()
1481 if (iter->under_oom > 0) in mem_cgroup_unmark_under_oom()
1482 iter->under_oom--; in mem_cgroup_unmark_under_oom()
2728 struct mem_cgroup *iter; in tree_stat() local
2733 for_each_mem_cgroup_tree(iter, memcg) { in tree_stat()
2735 stat[i] += mem_cgroup_read_stat(iter, i); in tree_stat()
2741 struct mem_cgroup *iter; in tree_events() local
2746 for_each_mem_cgroup_tree(iter, memcg) { in tree_events()
2748 events[i] += mem_cgroup_read_events(iter, i); in tree_events()
2757 struct mem_cgroup *iter; in mem_cgroup_usage() local
2759 for_each_mem_cgroup_tree(iter, memcg) { in mem_cgroup_usage()
2760 val += mem_cgroup_read_stat(iter, in mem_cgroup_usage()
2762 val += mem_cgroup_read_stat(iter, in mem_cgroup_usage()
2765 val += mem_cgroup_read_stat(iter, in mem_cgroup_usage()
3120 struct mem_cgroup *iter; in memcg_numa_stat_show() local
3123 for_each_mem_cgroup_tree(iter, memcg) in memcg_numa_stat_show()
3124 nr += mem_cgroup_nr_lru_pages(iter, stat->lru_mask); in memcg_numa_stat_show()
3128 for_each_mem_cgroup_tree(iter, memcg) in memcg_numa_stat_show()
3130 iter, nid, stat->lru_mask); in memcg_numa_stat_show()
3349 struct mem_cgroup *iter; in mem_cgroup_oom_notify() local
3351 for_each_mem_cgroup_tree(iter, memcg) in mem_cgroup_oom_notify()
3352 mem_cgroup_oom_notify_cb(iter); in mem_cgroup_oom_notify()