From patchwork Thu Sep 17 08:10:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oscar Salvador X-Patchwork-Id: 11781973 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 33365112E for ; Thu, 17 Sep 2020 08:28:16 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 06A0E20715 for ; Thu, 17 Sep 2020 08:28:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 06A0E20715 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 01E186B0068; Thu, 17 Sep 2020 04:28:15 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id EE3B56B006C; Thu, 17 Sep 2020 04:28:14 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DF83E6B006E; Thu, 17 Sep 2020 04:28:14 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0191.hostedemail.com [216.40.44.191]) by kanga.kvack.org (Postfix) with ESMTP id CAAD06B0068 for ; Thu, 17 Sep 2020 04:28:14 -0400 (EDT) Received: from smtpin12.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 968C72C84 for ; Thu, 17 Sep 2020 08:28:14 +0000 (UTC) X-FDA: 77271876108.12.plane92_1f0d49327121 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin12.hostedemail.com (Postfix) with ESMTP id 6ED8018017AC7 for ; Thu, 17 Sep 2020 08:28:14 +0000 (UTC) X-Spam-Summary: 1,0,0,,d41d8cd98f00b204,osalvador@suse.de,,RULES_HIT:30054,0,RBL:195.135.220.15:@suse.de:.lbl8.mailshell.net-64.100.201.201 62.2.6.2;04y8xnhx63hcx5943x5zzkrzdmq67oc4pq8ao9ggp6wch6ramj5cqt91gefuh4r.1c3dhnbki379x4di58fxg5m3wzxz779pr4y9485tzzf3d9ibphnokdzezasxmq5.q-lbl8.mailshell.net-223.238.255.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:25,LUA_SUMMARY:none X-HE-Tag: plane92_1f0d49327121 X-Filterd-Recvd-Size: 2050 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf39.hostedemail.com (Postfix) with ESMTP for ; Thu, 17 Sep 2020 08:28:13 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 78355B244; Thu, 17 Sep 2020 08:28:45 +0000 (UTC) From: Oscar Salvador To: akpm@linux-foundation.org Cc: aris@ruivo.org, naoya.horiguchi@nec.com, mhocko@kernel.org, tony.luck@intel.com, cai@lca.pw, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Oscar Salvador Subject: [PATCH v4 2/7] mm,hwpoison: Do not set hugepage_or_freepage unconditionally Date: Thu, 17 Sep 2020 10:10:44 +0200 Message-Id: <20200917081049.27428-3-osalvador@suse.de> X-Mailer: git-send-email 2.13.7 In-Reply-To: <20200917081049.27428-1-osalvador@suse.de> References: <20200917081049.27428-1-osalvador@suse.de> X-Rspamd-Queue-Id: 6ED8018017AC7 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam04 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Aristeu Rozanski reported that some hwpoison tests were returning -EBUSY while before the rework they succeed [1] [2]. The root case is that during a rebase, the call to page_handle_poison was setting hugepage_or_freepage = true unconditionally from __soft_offline_page. Aristeu said that after this fix, everything works. [1] https://patchwork.kernel.org/comment/23617301/ [2] https://patchwork.kernel.org/comment/23619535/ Signed-off-by: Oscar Salvador Reported-by: Aristeu Rozanski Tested-by: Aristeu Rozanski --- mm/memory-failure.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/memory-failure.c b/mm/memory-failure.c index 74a53881f94b..db61bdee9734 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c @@ -1852,7 +1852,7 @@ static int __soft_offline_page(struct page *page) if (!ret) { bool release = !huge; - if (!page_handle_poison(page, true, release)) + if (!page_handle_poison(page, huge, release)) ret = -EBUSY; } else { if (!list_empty(&pagelist))