The patch titled Subject: mm/memory-failure.c: fix wrong num_poisoned_pages in handling memory error on thp has been removed from the -mm tree. Its filename was mm-memory-failurec-fix-wrong-num_poisoned_pages-in-handling-memory-error-on-thp.patch This patch was dropped because an updated version will be merged ------------------------------------------------------ From: Naoya Horiguchi <n-horiguchi@xxxxxxxxxxxxx> Subject: mm/memory-failure.c: fix wrong num_poisoned_pages in handling memory error on thp num_poisoned_pages counts up the number of pages isolated by memory errors. But for thp, only one subpage is isolated because memory error handler splits it, so it's wrong to add (1 << compound_trans_order). Signed-off-by: Naoya Horiguchi <n-horiguchi@xxxxxxxxxxxxx> Cc: Andi Kleen <andi@xxxxxxxxxxxxxx> Cc: Tony Luck <tony.luck@xxxxxxxxx> Cc: Wu Fengguang <fengguang.wu@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/memory-failure.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff -puN mm/memory-failure.c~mm-memory-failurec-fix-wrong-num_poisoned_pages-in-handling-memory-error-on-thp mm/memory-failure.c --- a/mm/memory-failure.c~mm-memory-failurec-fix-wrong-num_poisoned_pages-in-handling-memory-error-on-thp +++ a/mm/memory-failure.c @@ -1039,7 +1039,14 @@ int memory_failure(unsigned long pfn, in return 0; } - nr_pages = 1 << compound_trans_order(hpage); + /* + * If a thp is hit by a memory failure, it's supposed to be split. + * So we should add only one to num_poisoned_pages for that case. + */ + if (PageHuge(p)) + nr_pages = 1 << compound_trans_order(hpage); + else /* normal page or thp */ + nr_pages = 1; atomic_long_add(nr_pages, &num_poisoned_pages); /* _ Patches currently in -mm which might be from n-horiguchi@xxxxxxxxxxxxx are memory-failure-fix-an-error-of-mce_bad_pages-statistics.patch mm-memory-failurec-clean-up-soft_offline_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