Lines Matching refs:nr_pages
190 unsigned int nr_pages; in hugetlb_cgroup_move_parent() local
204 nr_pages = compound_nr(page); in hugetlb_cgroup_move_parent()
208 page_counter_charge(&parent->hugepage[idx], nr_pages); in hugetlb_cgroup_move_parent()
212 page_counter_cancel(counter, nr_pages); in hugetlb_cgroup_move_parent()
254 static int __hugetlb_cgroup_charge_cgroup(int idx, unsigned long nr_pages, in __hugetlb_cgroup_charge_cgroup() argument
281 nr_pages, &counter)) { in __hugetlb_cgroup_charge_cgroup()
297 int hugetlb_cgroup_charge_cgroup(int idx, unsigned long nr_pages, in hugetlb_cgroup_charge_cgroup() argument
300 return __hugetlb_cgroup_charge_cgroup(idx, nr_pages, ptr, false); in hugetlb_cgroup_charge_cgroup()
303 int hugetlb_cgroup_charge_cgroup_rsvd(int idx, unsigned long nr_pages, in hugetlb_cgroup_charge_cgroup_rsvd() argument
306 return __hugetlb_cgroup_charge_cgroup(idx, nr_pages, ptr, true); in hugetlb_cgroup_charge_cgroup_rsvd()
310 static void __hugetlb_cgroup_commit_charge(int idx, unsigned long nr_pages, in __hugetlb_cgroup_commit_charge() argument
327 usage + nr_pages); in __hugetlb_cgroup_commit_charge()
331 void hugetlb_cgroup_commit_charge(int idx, unsigned long nr_pages, in hugetlb_cgroup_commit_charge() argument
335 __hugetlb_cgroup_commit_charge(idx, nr_pages, h_cg, page, false); in hugetlb_cgroup_commit_charge()
338 void hugetlb_cgroup_commit_charge_rsvd(int idx, unsigned long nr_pages, in hugetlb_cgroup_commit_charge_rsvd() argument
342 __hugetlb_cgroup_commit_charge(idx, nr_pages, h_cg, page, true); in hugetlb_cgroup_commit_charge_rsvd()
348 static void __hugetlb_cgroup_uncharge_page(int idx, unsigned long nr_pages, in __hugetlb_cgroup_uncharge_page() argument
363 nr_pages); in __hugetlb_cgroup_uncharge_page()
376 usage - nr_pages); in __hugetlb_cgroup_uncharge_page()
380 void hugetlb_cgroup_uncharge_page(int idx, unsigned long nr_pages, in hugetlb_cgroup_uncharge_page() argument
383 __hugetlb_cgroup_uncharge_page(idx, nr_pages, page, false); in hugetlb_cgroup_uncharge_page()
386 void hugetlb_cgroup_uncharge_page_rsvd(int idx, unsigned long nr_pages, in hugetlb_cgroup_uncharge_page_rsvd() argument
389 __hugetlb_cgroup_uncharge_page(idx, nr_pages, page, true); in hugetlb_cgroup_uncharge_page_rsvd()
392 static void __hugetlb_cgroup_uncharge_cgroup(int idx, unsigned long nr_pages, in __hugetlb_cgroup_uncharge_cgroup() argument
404 nr_pages); in __hugetlb_cgroup_uncharge_cgroup()
410 void hugetlb_cgroup_uncharge_cgroup(int idx, unsigned long nr_pages, in hugetlb_cgroup_uncharge_cgroup() argument
413 __hugetlb_cgroup_uncharge_cgroup(idx, nr_pages, h_cg, false); in hugetlb_cgroup_uncharge_cgroup()
416 void hugetlb_cgroup_uncharge_cgroup_rsvd(int idx, unsigned long nr_pages, in hugetlb_cgroup_uncharge_cgroup_rsvd() argument
419 __hugetlb_cgroup_uncharge_cgroup(idx, nr_pages, h_cg, true); in hugetlb_cgroup_uncharge_cgroup_rsvd()
436 unsigned long nr_pages, in hugetlb_cgroup_uncharge_file_region() argument
439 if (hugetlb_cgroup_disabled() || !resv || !rg || !nr_pages) in hugetlb_cgroup_uncharge_file_region()
445 nr_pages * resv->pages_per_hpage); in hugetlb_cgroup_uncharge_file_region()
598 unsigned long nr_pages; in hugetlb_cgroup_write() local
606 ret = page_counter_memparse(buf, max, &nr_pages); in hugetlb_cgroup_write()
611 nr_pages = round_down(nr_pages, pages_per_huge_page(&hstates[idx])); in hugetlb_cgroup_write()
621 nr_pages); in hugetlb_cgroup_write()