The patch titled Subject: mm: hugetlb: return immediately for hugetlb page in __delete_from_page_cache() has been added to the -mm tree. Its filename is mm-hugetlb-return-immediately-for-hugetlb-page-in-__delete_from_page_cache.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/mm-hugetlb-return-immediately-for-hugetlb-page-in-__delete_from_page_cache.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/mm-hugetlb-return-immediately-for-hugetlb-page-in-__delete_from_page_cache.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Naoya Horiguchi <n-horiguchi@xxxxxxxxxxxxx> Subject: mm: hugetlb: return immediately for hugetlb page in __delete_from_page_cache() We avoid calling __mod_node_page_state(NR_FILE_PAGES) for hugetlb page now, but it's not enough because later code doesn't handle hugetlb properly. Actually in our testing, WARN_ON_ONCE(PageDirty(page)) at the end of this function fires for hugetlb, which makes no sense. So we should return immediately for hugetlb pages. Link: http://lkml.kernel.org/r/1496305019-5493-3-git-send-email-n-horiguchi@xxxxxxxxxxxxx Signed-off-by: Naoya Horiguchi <n-horiguchi@xxxxxxxxxxxxx> Cc: Michal Hocko <mhocko@xxxxxxxxxx> Cc: "Aneesh Kumar K.V" <aneesh.kumar@xxxxxxxxxxxxxxxxxx> Cc: Anshuman Khandual <khandual@xxxxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/filemap.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff -puN mm/filemap.c~mm-hugetlb-return-immediately-for-hugetlb-page-in-__delete_from_page_cache mm/filemap.c --- a/mm/filemap.c~mm-hugetlb-return-immediately-for-hugetlb-page-in-__delete_from_page_cache +++ a/mm/filemap.c @@ -239,14 +239,16 @@ void __delete_from_page_cache(struct pag /* Leave page->index set: truncation lookup relies upon it */ /* hugetlb pages do not participate in page cache accounting. */ - if (!PageHuge(page)) - __mod_node_page_state(page_pgdat(page), NR_FILE_PAGES, -nr); + if (PageHuge(page)) + return; + + __mod_node_page_state(page_pgdat(page), NR_FILE_PAGES, -nr); if (PageSwapBacked(page)) { __mod_node_page_state(page_pgdat(page), NR_SHMEM, -nr); if (PageTransHuge(page)) __dec_node_page_state(page, NR_SHMEM_THPS); } else { - VM_BUG_ON_PAGE(PageTransHuge(page) && !PageHuge(page), page); + VM_BUG_ON_PAGE(PageTransHuge(page), page); } /* _ Patches currently in -mm which might be from n-horiguchi@xxxxxxxxxxxxx are mm-drop-null-return-check-of-pte_offset_map_lock.patch mm-hugetlb-prevent-reuse-of-hwpoisoned-free-hugepages.patch mm-hugetlb-return-immediately-for-hugetlb-page-in-__delete_from_page_cache.patch mm-hwpoison-change-pagehwpoison-behavior-on-hugetlb-pages.patch mm-soft-offline-dissolve-free-hugepage-if-soft-offlined.patch mm-hwpoison-introduce-memory_failure_hugetlb.patch mm-hwpoison-dissolve-in-use-hugepage-in-unrecoverable-memory-error.patch mm-hugetlb-delete-dequeue_hwpoisoned_huge_page.patch mm-hwpoison-introduce-idenfity_page_state.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