The patch titled Subject: mm, hugetlbfs: Fix new warning in fault-time huge page allocation has been removed from the -mm tree. Its filename was mm-hugetlb-use-memory-policy-when-available-fix.patch This patch was dropped because it was folded into mm-hugetlb-use-memory-policy-when-available.patch ------------------------------------------------------ From: Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx> Subject: mm, hugetlbfs: Fix new warning in fault-time huge page allocation Kirill reported that he hit: >> + if (vma || addr) { >> + WARN_ON_ONCE(!addr || addr == -1); > > Trinity triggered the WARN for me: This was just a dumb mistake. I put the WARN_ON() in and planned to have addr=0 mean "use nid". But, I realized pretty quickly that addr=0 _is_ a valid place to fault. So I made it addr=-1 in __alloc_buddy_huge_page_no_mpol(), but I did not fix up the WARN_ON(). So hitting the warning in this case was harmless. But, fix up the warning condition. Signed-off-by: Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx> Cc: Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx> Cc: Naoya Horiguchi <n-horiguchi@xxxxxxxxxxxxx> Cc: Mike Kravetz <mike.kravetz@xxxxxxxxxx> Cc: Hillf Danton <hillf.zj@xxxxxxxxxxxxxxx> Cc: David Rientjes <rientjes@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/hugetlb.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff -puN mm/hugetlb.c~mm-hugetlb-use-memory-policy-when-available-fix mm/hugetlb.c --- a/mm/hugetlb.c~mm-hugetlb-use-memory-policy-when-available-fix +++ a/mm/hugetlb.c @@ -1514,8 +1514,13 @@ static struct page *__alloc_buddy_huge_p if (hstate_is_gigantic(h)) return NULL; - if (vma || addr) { - WARN_ON_ONCE(!addr || addr == -1); + /* + * Make sure that anyone specifying 'nid' is not also specifying a VMA. + * This makes sure the caller is picking _one_ of the modes with which + * we can call this function, not both. + */ + if (vma || (addr != -1)) { + WARN_ON_ONCE(addr == -1); WARN_ON_ONCE(nid != NUMA_NO_NODE); } /* _ Patches currently in -mm which might be from dave.hansen@xxxxxxxxxxxxxxx are inotify-hide-internal-kernel-bits-from-fdinfo.patch inotify-actually-check-for-invalid-bits-in-sys_inotify_add_watch.patch mm-hugetlb-use-memory-policy-when-available.patch mm-hugetlbfs-optimize-when-numa=n.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