The patch titled Subject: mm-hugetlb-add-a-new-function-to-allocate-a-new-gigantic-page-v2 has been removed from the -mm tree. Its filename was mm-hugetlb-add-a-new-function-to-allocate-a-new-gigantic-page-v2.patch This patch was dropped because an updated version will be merged ------------------------------------------------------ From: Huang Shijie <shijie.huang@xxxxxxx> Subject: mm-hugetlb-add-a-new-function-to-allocate-a-new-gigantic-page-v2 Since the huge_nodemask() is changed, we have to change this function a little. Link: http://lkml.kernel.org/r/1479279304-31379-1-git-send-email-shijie.huang@xxxxxxx Signed-off-by: Huang Shijie <shijie.huang@xxxxxxx> Cc: Catalin Marinas <catalin.marinas@xxxxxxx> Cc: Naoya Horiguchi <n-horiguchi@xxxxxxxxxxxxx> Cc: Michal Hocko <mhocko@xxxxxxxx> Cc: Kirill A . Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx> Cc: Aneesh Kumar K.V <aneesh.kumar@xxxxxxxxxxxxxxxxxx> Cc: Gerald Schaefer <gerald.schaefer@xxxxxxxxxx> Cc: Mike Kravetz <mike.kravetz@xxxxxxxxxx> Cc: Will Deacon <will.deacon@xxxxxxx> Cc: Steve Capper <steve.capper@xxxxxxx> Cc: Kaly Xin <kaly.xin@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/hugetlb.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff -puN mm/hugetlb.c~mm-hugetlb-add-a-new-function-to-allocate-a-new-gigantic-page-v2 mm/hugetlb.c --- a/mm/hugetlb.c~mm-hugetlb-add-a-new-function-to-allocate-a-new-gigantic-page-v2 +++ a/mm/hugetlb.c @@ -1507,19 +1507,19 @@ int dissolve_free_huge_pages(unsigned lo * the gigantic page. * * 2. The NUMA is enabled, but the vma is NULL. - * Create a @nodes_allowed, use alloc_fresh_gigantic_page() to get + * Create a @nodes_allowed, and use alloc_fresh_gigantic_page() to get * the gigantic page. * * 3. The NUMA is enabled, and the vma is valid. * Use the @vma's memory policy. - * Get @nodes_mask by huge_nodemask(), and use alloc_fresh_gigantic_page() + * Get @nodes_allowed by huge_nodemask(), and use alloc_fresh_gigantic_page() * to get the gigantic page. */ static struct page *__hugetlb_alloc_gigantic_page(struct hstate *h, struct vm_area_struct *vma, unsigned long addr, int nid) { - struct page *page; - nodemask_t *nodes_mask; + NODEMASK_ALLOC(nodemask_t, nodes_allowed, GFP_KERNEL | __GFP_NORETRY); + struct page *page = NULL; /* Not NUMA */ if (!IS_ENABLED(CONFIG_NUMA)) { @@ -1530,14 +1530,12 @@ static struct page *__hugetlb_alloc_giga if (page) prep_compound_gigantic_page(page, huge_page_order(h)); + NODEMASK_FREE(nodes_allowed); return page; } /* NUMA && !vma */ if (!vma) { - NODEMASK_ALLOC(nodemask_t, nodes_allowed, - GFP_KERNEL | __GFP_NORETRY); - if (nid == NUMA_NO_NODE) { if (!init_nodemask_of_mempolicy(nodes_allowed)) { NODEMASK_FREE(nodes_allowed); @@ -1558,13 +1556,11 @@ static struct page *__hugetlb_alloc_giga } /* NUMA && vma */ - nodes_mask = huge_nodemask(vma, addr); - if (nodes_mask) { - page = alloc_fresh_gigantic_page(h, nodes_mask, true); - if (page) - return page; - } - return NULL; + if (huge_nodemask(vma, addr, nodes_allowed)) + page = alloc_fresh_gigantic_page(h, nodes_allowed, true); + + NODEMASK_FREE(nodes_allowed); + return page; } /* _ Patches currently in -mm which might be from shijie.huang@xxxxxxx are mm-hugetlb-support-gigantic-surplus-pages.patch mm-hugetlb-add-description-for-alloc_gigantic_page.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html