Lines Matching refs:hpage

2316 static bool khugepaged_prealloc_page(struct page **hpage, bool *wait)  in khugepaged_prealloc_page()  argument
2318 if (IS_ERR(*hpage)) { in khugepaged_prealloc_page()
2323 *hpage = NULL; in khugepaged_prealloc_page()
2325 } else if (*hpage) { in khugepaged_prealloc_page()
2326 put_page(*hpage); in khugepaged_prealloc_page()
2327 *hpage = NULL; in khugepaged_prealloc_page()
2334 khugepaged_alloc_page(struct page **hpage, gfp_t gfp, struct mm_struct *mm, in khugepaged_alloc_page() argument
2338 VM_BUG_ON_PAGE(*hpage, *hpage); in khugepaged_alloc_page()
2348 *hpage = alloc_pages_exact_node(node, gfp, HPAGE_PMD_ORDER); in khugepaged_alloc_page()
2349 if (unlikely(!*hpage)) { in khugepaged_alloc_page()
2351 *hpage = ERR_PTR(-ENOMEM); in khugepaged_alloc_page()
2356 return *hpage; in khugepaged_alloc_page()
2372 struct page *hpage; in khugepaged_alloc_hugepage() local
2375 hpage = alloc_hugepage(khugepaged_defrag()); in khugepaged_alloc_hugepage()
2376 if (!hpage) { in khugepaged_alloc_hugepage()
2385 } while (unlikely(!hpage) && likely(khugepaged_enabled())); in khugepaged_alloc_hugepage()
2387 return hpage; in khugepaged_alloc_hugepage()
2390 static bool khugepaged_prealloc_page(struct page **hpage, bool *wait) in khugepaged_prealloc_page() argument
2392 if (!*hpage) in khugepaged_prealloc_page()
2393 *hpage = khugepaged_alloc_hugepage(wait); in khugepaged_prealloc_page()
2395 if (unlikely(!*hpage)) in khugepaged_prealloc_page()
2402 khugepaged_alloc_page(struct page **hpage, gfp_t gfp, struct mm_struct *mm, in khugepaged_alloc_page() argument
2407 VM_BUG_ON(!*hpage); in khugepaged_alloc_page()
2409 return *hpage; in khugepaged_alloc_page()
2428 struct page **hpage, in collapse_huge_page() argument
2451 new_page = khugepaged_alloc_page(hpage, gfp, mm, vma, address, node); in collapse_huge_page()
2550 *hpage = NULL; in collapse_huge_page()
2565 struct page **hpage) in khugepaged_scan_pmd() argument
2632 collapse_huge_page(mm, address, hpage, vma, node); in khugepaged_scan_pmd()
2662 struct page **hpage) in khugepaged_scan_mm_slot() argument
2726 hpage); in khugepaged_scan_mm_slot()
2783 struct page *hpage = NULL; in khugepaged_do_scan() local
2791 if (!khugepaged_prealloc_page(&hpage, &wait)) in khugepaged_do_scan()
2805 &hpage); in khugepaged_do_scan()
2811 if (!IS_ERR_OR_NULL(hpage)) in khugepaged_do_scan()
2812 put_page(hpage); in khugepaged_do_scan()