The patch titled mm/memory-failure.c: fix page isolated count mismatch has been added to the -mm tree. Its filename is mm-memory-failurec-fix-page-isolated-count-mismatch.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 *** See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: mm/memory-failure.c: fix page isolated count mismatch From: Minchan Kim <minchan.kim@xxxxxxxxx> Pages isolated for migration are accounted with the vmstat counters NR_ISOLATE_[ANON|FILE]. Callers of migrate_pages() are expected to increment these counters when pages are isolated from the LRU. Once the pages have been migrated, they are put back on the LRU or freed and the isolated count is decremented. Memory failure is not properly accounting for pages it isolates causing the NR_ISOLATED counters to be negative. On SMP builds, this goes unnoticed as negative counters are treated as 0 due to expected per-cpu drift. On UP builds, the counter is treated by too_many_isolated() as a large value causing processes to enter D state during page reclaim or compaction. This patch accounts for pages isolated by memory failure correctly. [mel@xxxxxxxxx: rewrote changelog] Reviewed-by: Andrea Arcangeli <aarcange@xxxxxxxxxx> Signed-off-by: Minchan Kim <minchan.kim@xxxxxxxxx> Cc: Andi Kleen <andi@xxxxxxxxxxxxxx> Acked-by: Mel Gorman <mel@xxxxxxxxx> Cc: <stable@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/memory-failure.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff -puN mm/memory-failure.c~mm-memory-failurec-fix-page-isolated-count-mismatch mm/memory-failure.c --- a/mm/memory-failure.c~mm-memory-failurec-fix-page-isolated-count-mismatch +++ a/mm/memory-failure.c @@ -52,6 +52,7 @@ #include <linux/swapops.h> #include <linux/hugetlb.h> #include <linux/memory_hotplug.h> +#include <linux/mm_inline.h> #include "internal.h" int sysctl_memory_failure_early_kill __read_mostly = 0; @@ -1468,7 +1469,8 @@ int soft_offline_page(struct page *page, put_page(page); if (!ret) { LIST_HEAD(pagelist); - + inc_zone_page_state(page, NR_ISOLATED_ANON + + page_is_file_cache(page)); list_add(&page->lru, &pagelist); ret = migrate_pages(&pagelist, new_page, MPOL_MF_MOVE_ALL, 0, true); _ Patches currently in -mm which might be from minchan.kim@xxxxxxxxx are mm-remove-khugepaged-double-thp-vmstat-update-with-config_numa=n.patch mm-compaction-fix-special-case-1-order-checks.patch mm-migratec-dont-account-swapcache-as-shmem.patch mm-memory-failurec-fix-page-isolated-count-mismatch.patch compaction-checks-correct-fragmentation-index.patch mm-compaction-ensure-that-the-compaction-free-scanner-does-not-move-to-the-next-zone.patch mm-vmscan-do-not-use-page_count-without-a-page-pin.patch mm-compaction-abort-compaction-if-too-many-pages-are-isolated-and-caller-is-asynchronous-v2.patch linux-next.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