Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753317AbdHOBxu (ORCPT ); Mon, 14 Aug 2017 21:53:50 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:45695 "EHLO out4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753664AbdHOBwn (ORCPT ); Mon, 14 Aug 2017 21:52:43 -0400 X-ME-Sender: X-Sasl-enc: r20fSMT4F5Aaz3W/TJ7wBzrzvGiD6inOpUPWkuHILpDS 1502761962 From: Zi Yan To: Naoya Horiguchi Cc: Greg Kroah-Hartman , "Kirill A . Shutemov" , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Zi Yan Subject: [RFC PATCH 4/4] mm: hwpoison: soft offline supports thp migration Date: Mon, 14 Aug 2017 21:52:16 -0400 Message-Id: <20170815015216.31827-5-zi.yan@sent.com> X-Mailer: git-send-email 2.13.2 In-Reply-To: <20170815015216.31827-1-zi.yan@sent.com> References: <20170815015216.31827-1-zi.yan@sent.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1194 Lines: 41 From: Zi Yan This patch enables thp migration for soft offline. Signed-off-by: Zi Yan --- 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