Lines Matching refs:nr_pages

161 	unsigned int nr_pages;  in hugetlb_cgroup_move_parent()  local
175 nr_pages = compound_nr(page); in hugetlb_cgroup_move_parent()
179 page_counter_charge(&parent->hugepage[idx], nr_pages); in hugetlb_cgroup_move_parent()
183 page_counter_cancel(counter, nr_pages); in hugetlb_cgroup_move_parent()
228 static int __hugetlb_cgroup_charge_cgroup(int idx, unsigned long nr_pages, in __hugetlb_cgroup_charge_cgroup() argument
255 nr_pages, &counter)) { in __hugetlb_cgroup_charge_cgroup()
271 int hugetlb_cgroup_charge_cgroup(int idx, unsigned long nr_pages, in hugetlb_cgroup_charge_cgroup() argument
274 return __hugetlb_cgroup_charge_cgroup(idx, nr_pages, ptr, false); in hugetlb_cgroup_charge_cgroup()
277 int hugetlb_cgroup_charge_cgroup_rsvd(int idx, unsigned long nr_pages, in hugetlb_cgroup_charge_cgroup_rsvd() argument
280 return __hugetlb_cgroup_charge_cgroup(idx, nr_pages, ptr, true); in hugetlb_cgroup_charge_cgroup_rsvd()
284 static void __hugetlb_cgroup_commit_charge(int idx, unsigned long nr_pages, in __hugetlb_cgroup_commit_charge() argument
295 void hugetlb_cgroup_commit_charge(int idx, unsigned long nr_pages, in hugetlb_cgroup_commit_charge() argument
299 __hugetlb_cgroup_commit_charge(idx, nr_pages, h_cg, page, false); in hugetlb_cgroup_commit_charge()
302 void hugetlb_cgroup_commit_charge_rsvd(int idx, unsigned long nr_pages, in hugetlb_cgroup_commit_charge_rsvd() argument
306 __hugetlb_cgroup_commit_charge(idx, nr_pages, h_cg, page, true); in hugetlb_cgroup_commit_charge_rsvd()
312 static void __hugetlb_cgroup_uncharge_page(int idx, unsigned long nr_pages, in __hugetlb_cgroup_uncharge_page() argument
327 nr_pages); in __hugetlb_cgroup_uncharge_page()
335 void hugetlb_cgroup_uncharge_page(int idx, unsigned long nr_pages, in hugetlb_cgroup_uncharge_page() argument
338 __hugetlb_cgroup_uncharge_page(idx, nr_pages, page, false); in hugetlb_cgroup_uncharge_page()
341 void hugetlb_cgroup_uncharge_page_rsvd(int idx, unsigned long nr_pages, in hugetlb_cgroup_uncharge_page_rsvd() argument
344 __hugetlb_cgroup_uncharge_page(idx, nr_pages, page, true); in hugetlb_cgroup_uncharge_page_rsvd()
347 static void __hugetlb_cgroup_uncharge_cgroup(int idx, unsigned long nr_pages, in __hugetlb_cgroup_uncharge_cgroup() argument
359 nr_pages); in __hugetlb_cgroup_uncharge_cgroup()
365 void hugetlb_cgroup_uncharge_cgroup(int idx, unsigned long nr_pages, in hugetlb_cgroup_uncharge_cgroup() argument
368 __hugetlb_cgroup_uncharge_cgroup(idx, nr_pages, h_cg, false); in hugetlb_cgroup_uncharge_cgroup()
371 void hugetlb_cgroup_uncharge_cgroup_rsvd(int idx, unsigned long nr_pages, in hugetlb_cgroup_uncharge_cgroup_rsvd() argument
374 __hugetlb_cgroup_uncharge_cgroup(idx, nr_pages, h_cg, true); in hugetlb_cgroup_uncharge_cgroup_rsvd()
391 unsigned long nr_pages, in hugetlb_cgroup_uncharge_file_region() argument
394 if (hugetlb_cgroup_disabled() || !resv || !rg || !nr_pages) in hugetlb_cgroup_uncharge_file_region()
397 if (rg->reservation_counter && resv->pages_per_hpage && nr_pages > 0 && in hugetlb_cgroup_uncharge_file_region()
400 nr_pages * resv->pages_per_hpage); in hugetlb_cgroup_uncharge_file_region()
500 unsigned long nr_pages; in hugetlb_cgroup_write() local
508 ret = page_counter_memparse(buf, max, &nr_pages); in hugetlb_cgroup_write()
513 nr_pages = round_down(nr_pages, pages_per_huge_page(&hstates[idx])); in hugetlb_cgroup_write()
523 nr_pages); in hugetlb_cgroup_write()