I rebased soft-offline rework patchset [1][2] onto the latest mmotm. The rebasing required some non-trivial changes to adjust, but mainly that was straightforward. I confirmed that the reported problem doesn't reproduce on compaction after soft offline. For more precise description of the problem and the motivation of this patchset, please see [2]. I think that the following two patches in v2 are better to be done with separate work of hard-offline rework, so it's not included in this series. - mm,hwpoison: Take pages off the buddy when hard-offlining - mm/hwpoison-inject: Rip off duplicated checks These two are not directly related to the reported problem, so they seems not urgent. And the first one breaks num_poisoned_pages counting in some testcases, and The second patch needs more consideration about commented point. Any comment/suggestion/help would be appreciated. [1] v1: https://lore.kernel.org/linux-mm/1541746035-13408-1-git-send-email-n-horiguchi@xxxxxxxxxxxxx/ [2] v2: https://lore.kernel.org/linux-mm/20191017142123.24245-1-osalvador@xxxxxxx/ Thanks, Naoya Horiguchi --- Summary: Naoya Horiguchi (7): mm,hwpoison: cleanup unused PageHuge() check mm, hwpoison: remove recalculating hpage mm,madvise: call soft_offline_page() without MF_COUNT_INCREASED mm,hwpoison-inject: don't pin for hwpoison_filter mm,hwpoison: remove MF_COUNT_INCREASED mm,hwpoison: remove flag argument from soft offline functions mm,hwpoison: introduce MF_MSG_UNSPLIT_THP Oscar Salvador (8): mm,madvise: Refactor madvise_inject_error mm,hwpoison: Un-export get_hwpoison_page and make it static mm,hwpoison: Kill put_hwpoison_page mm,hwpoison: Unify THP handling for hard and soft offline mm,hwpoison: Rework soft offline for free pages mm,hwpoison: Rework soft offline for in-use pages mm,hwpoison: Refactor soft_offline_huge_page and __soft_offline_page mm,hwpoison: Return 0 if the page is already poisoned in soft-offline drivers/base/memory.c | 2 +- include/linux/mm.h | 12 +- include/linux/page-flags.h | 6 +- include/ras/ras_event.h | 3 + mm/hwpoison-inject.c | 18 +-- mm/madvise.c | 39 +++--- mm/memory-failure.c | 331 ++++++++++++++++++++------------------------- mm/migrate.c | 11 +- mm/page_alloc.c | 63 +++++++-- 9 files changed, 233 insertions(+), 252 deletions(-)