Lines Matching refs:counter
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()
274 return (u64)page_counter_read(counter) * PAGE_SIZE; in hugetlb_cgroup_read_u64()
276 return (u64)counter->max * PAGE_SIZE; in hugetlb_cgroup_read_u64()
278 return (u64)counter->watermark * PAGE_SIZE; in hugetlb_cgroup_read_u64()
280 return counter->failcnt; in hugetlb_cgroup_read_u64()
323 struct page_counter *counter; in hugetlb_cgroup_reset() local
326 counter = &h_cg->hugepage[MEMFILE_IDX(of_cft(of)->private)]; in hugetlb_cgroup_reset()
330 page_counter_reset_watermark(counter); in hugetlb_cgroup_reset()
333 counter->failcnt = 0; in hugetlb_cgroup_reset()