From: Zi Yan <[email protected]> This patch enables thp migration for soft offline.
Signed-off-by: Zi Yan <[email protected]> --- mm/memory-failure.c | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/mm/memory-failure.c b/mm/memory-failure.c index c05107548d72..02ae1aff51a4 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c @@ -1712,25 +1712,6 @@ static int __soft_offline_page(struct page *page, int flags, int *split) static int soft_offline_in_use_page(struct page *page, int flags, int *split) { int ret; - struct page *hpage = compound_head(page); - - if (!PageHuge(page) && PageTransHuge(hpage)) { - lock_page(hpage); - if (!PageAnon(hpage) || unlikely(split_huge_page(hpage))) { - unlock_page(hpage); - if (!PageAnon(hpage)) - pr_info("soft offline: %#lx: non anonymous thp\n", page_to_pfn(page)); - else - pr_info("soft offline: %#lx: thp split failed\n", page_to_pfn(page)); - put_hwpoison_page(hpage); - return -EBUSY; - } - if (split) - *split = 1; - unlock_page(hpage); - get_hwpoison_page(page); - put_hwpoison_page(hpage); - } if (PageHuge(page)) ret = soft_offline_huge_page(page, flags); -- 2.13.2

