Lines Matching refs:hpage
2395 static bool khugepaged_prealloc_page(struct page **hpage, bool *wait) in khugepaged_prealloc_page() argument
2397 if (IS_ERR(*hpage)) { in khugepaged_prealloc_page()
2402 *hpage = NULL; in khugepaged_prealloc_page()
2404 } else if (*hpage) { in khugepaged_prealloc_page()
2405 put_page(*hpage); in khugepaged_prealloc_page()
2406 *hpage = NULL; in khugepaged_prealloc_page()
2413 khugepaged_alloc_page(struct page **hpage, gfp_t gfp, struct mm_struct *mm, in khugepaged_alloc_page() argument
2416 VM_BUG_ON_PAGE(*hpage, *hpage); in khugepaged_alloc_page()
2426 *hpage = __alloc_pages_node(node, gfp, HPAGE_PMD_ORDER); in khugepaged_alloc_page()
2427 if (unlikely(!*hpage)) { in khugepaged_alloc_page()
2429 *hpage = ERR_PTR(-ENOMEM); in khugepaged_alloc_page()
2434 return *hpage; in khugepaged_alloc_page()
2450 struct page *hpage; in khugepaged_alloc_hugepage() local
2453 hpage = alloc_hugepage(khugepaged_defrag()); in khugepaged_alloc_hugepage()
2454 if (!hpage) { in khugepaged_alloc_hugepage()
2463 } while (unlikely(!hpage) && likely(khugepaged_enabled())); in khugepaged_alloc_hugepage()
2465 return hpage; in khugepaged_alloc_hugepage()
2468 static bool khugepaged_prealloc_page(struct page **hpage, bool *wait) in khugepaged_prealloc_page() argument
2470 if (!*hpage) in khugepaged_prealloc_page()
2471 *hpage = khugepaged_alloc_hugepage(wait); in khugepaged_prealloc_page()
2473 if (unlikely(!*hpage)) in khugepaged_prealloc_page()
2480 khugepaged_alloc_page(struct page **hpage, gfp_t gfp, struct mm_struct *mm, in khugepaged_alloc_page() argument
2484 VM_BUG_ON(!*hpage); in khugepaged_alloc_page()
2486 return *hpage; in khugepaged_alloc_page()
2505 struct page **hpage, in collapse_huge_page() argument
2528 new_page = khugepaged_alloc_page(hpage, gfp, mm, address, node); in collapse_huge_page()
2627 *hpage = NULL; in collapse_huge_page()
2642 struct page **hpage) in khugepaged_scan_pmd() argument
2711 collapse_huge_page(mm, address, hpage, vma, node); in khugepaged_scan_pmd()
2741 struct page **hpage) in khugepaged_scan_mm_slot() argument
2805 hpage); in khugepaged_scan_mm_slot()
2862 struct page *hpage = NULL; in khugepaged_do_scan() local
2870 if (!khugepaged_prealloc_page(&hpage, &wait)) in khugepaged_do_scan()
2884 &hpage); in khugepaged_do_scan()
2890 if (!IS_ERR_OR_NULL(hpage)) in khugepaged_do_scan()
2891 put_page(hpage); in khugepaged_do_scan()