Searched refs:counter (Results 1 – 3 of 3) sorted by relevance
/mm/ |
D | page_counter.c | 55 void page_counter_cancel(struct page_counter *counter, unsigned long nr_pages) in page_counter_cancel() argument 59 new = atomic_long_sub_return(nr_pages, &counter->usage); in page_counter_cancel() 60 propagate_protected_usage(counter, new); in page_counter_cancel() 72 void page_counter_charge(struct page_counter *counter, unsigned long nr_pages) in page_counter_charge() argument 76 for (c = counter; c; c = c->parent) { in page_counter_charge() 80 propagate_protected_usage(counter, new); in page_counter_charge() 99 bool page_counter_try_charge(struct page_counter *counter, in page_counter_try_charge() argument 105 for (c = counter; c; c = c->parent) { in page_counter_try_charge() 124 propagate_protected_usage(counter, new); in page_counter_try_charge() 133 propagate_protected_usage(counter, new); in page_counter_try_charge() [all …]
|
D | hugetlb_cgroup.c | 76 struct page_counter *counter = &h_cgroup->hugepage[idx]; in hugetlb_cgroup_init() local 83 page_counter_init(counter, parent); in hugetlb_cgroup_init() 87 ret = page_counter_set_max(counter, limit); in hugetlb_cgroup_init() 129 struct page_counter *counter; in hugetlb_cgroup_move_parent() local 148 counter = &h_cg->hugepage[idx]; in hugetlb_cgroup_move_parent() 150 page_counter_cancel(counter, nr_pages); in hugetlb_cgroup_move_parent() 185 struct page_counter *counter; in hugetlb_cgroup_charge_cgroup() local 205 if (!page_counter_try_charge(&h_cg->hugepage[idx], nr_pages, &counter)) in hugetlb_cgroup_charge_cgroup() 267 struct page_counter *counter; in hugetlb_cgroup_read_u64() local 270 counter = &h_cg->hugepage[MEMFILE_IDX(cft->private)]; in hugetlb_cgroup_read_u64() [all …]
|
D | memcontrol.c | 2508 struct page_counter *counter; in try_charge() local 2521 page_counter_try_charge(&memcg->memsw, batch, &counter)) { in try_charge() 2522 if (page_counter_try_charge(&memcg->memory, batch, &counter)) in try_charge() 2526 mem_over_limit = mem_cgroup_from_counter(counter, memory); in try_charge() 2528 mem_over_limit = mem_cgroup_from_counter(counter, memsw); in try_charge() 2951 struct page_counter *counter; in __memcg_kmem_charge_memcg() local 2959 !page_counter_try_charge(&memcg->kmem, nr_pages, &counter)) { in __memcg_kmem_charge_memcg() 3111 struct page_counter *counter = memsw ? &memcg->memsw : &memcg->memory; in mem_cgroup_resize_max() local 3131 if (max > counter->max) in mem_cgroup_resize_max() 3133 ret = page_counter_set_max(counter, max); in mem_cgroup_resize_max() [all …]
|