Searched refs:counter (Results 1 – 4 of 4) sorted by relevance
/mm/ |
D | page_counter.c | 51 void page_counter_cancel(struct page_counter *counter, unsigned long nr_pages) in page_counter_cancel() argument 55 new = atomic_long_sub_return(nr_pages, &counter->usage); in page_counter_cancel() 60 atomic_long_set(&counter->usage, new); in page_counter_cancel() 62 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() 100 bool page_counter_try_charge(struct page_counter *counter, in page_counter_try_charge() argument 106 for (c = counter; c; c = c->parent) { in page_counter_try_charge() 147 for (c = counter; c != *fail; c = c->parent) in page_counter_try_charge() 158 void page_counter_uncharge(struct page_counter *counter, unsigned long nr_pages) in page_counter_uncharge() argument [all …]
|
D | hugetlb_cgroup.c | 30 #define hugetlb_cgroup_from_counter(counter, idx) \ argument 31 container_of(counter, struct hugetlb_cgroup, hugepage[idx]) 165 struct page_counter *counter; in hugetlb_cgroup_move_parent() local 184 counter = &h_cg->hugepage[idx]; in hugetlb_cgroup_move_parent() 186 page_counter_cancel(counter, nr_pages); in hugetlb_cgroup_move_parent() 236 struct page_counter *counter; in __hugetlb_cgroup_charge_cgroup() local 258 nr_pages, &counter)) { in __hugetlb_cgroup_charge_cgroup() 427 struct page_counter *counter; in hugetlb_cgroup_read_u64() local 431 counter = &h_cg->hugepage[MEMFILE_IDX(cft->private)]; in hugetlb_cgroup_read_u64() 436 return (u64)page_counter_read(counter) * PAGE_SIZE; in hugetlb_cgroup_read_u64() [all …]
|
D | memcontrol.c | 2610 struct page_counter *counter; in try_charge_memcg() local 2623 page_counter_try_charge(&memcg->memsw, batch, &counter)) { in try_charge_memcg() 2624 if (page_counter_try_charge(&memcg->memory, batch, &counter)) in try_charge_memcg() 2628 mem_over_limit = mem_cgroup_from_counter(counter, memory); in try_charge_memcg() 2630 mem_over_limit = mem_cgroup_from_counter(counter, memsw); in try_charge_memcg() 3025 struct page_counter *counter; in obj_cgroup_charge_pages() local 3036 !page_counter_try_charge(&memcg->kmem, nr_pages, &counter)) { in obj_cgroup_charge_pages() 3393 struct page_counter *counter = memsw ? &memcg->memsw : &memcg->memory; in mem_cgroup_resize_max() local 3413 if (max > counter->max) in mem_cgroup_resize_max() 3415 ret = page_counter_set_max(counter, max); in mem_cgroup_resize_max() [all …]
|
/mm/kasan/ |
D | kasan_test.c | 596 int counter = 0; in kmalloc_uaf2() local 611 if (!IS_ENABLED(CONFIG_KASAN_GENERIC) && ptr1 == ptr2 && counter++ < 16) { in kmalloc_uaf2()
|