From patchwork Tue Sep 8 07:56:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oscar Salvador X-Patchwork-Id: 11762825 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 5EF61746 for ; Tue, 8 Sep 2020 07:56:46 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 3E43D2177B for ; Tue, 8 Sep 2020 07:56:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3E43D2177B 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 C23D16B0062; Tue, 8 Sep 2020 03:56:38 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id BD7318E0001; Tue, 8 Sep 2020 03:56:38 -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 A4D496B006C; Tue, 8 Sep 2020 03:56:38 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0206.hostedemail.com [216.40.44.206]) by kanga.kvack.org (Postfix) with ESMTP id 8739D6B0062 for ; Tue, 8 Sep 2020 03:56:38 -0400 (EDT) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 4F5768248D52 for ; Tue, 8 Sep 2020 07:56:38 +0000 (UTC) X-FDA: 77239137276.08.tax37_0813d73270d3 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin08.hostedemail.com (Postfix) with ESMTP id 2BF801819E766 for ; Tue, 8 Sep 2020 07:56:38 +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-62.2.6.2 64.100.201.201;04ygnzddo415zcbosx7bar53ur9aqoc5seeg7te93f7aqpnpu85z38yamoyzwzy.6363wihjqxm33eqixss7bddsfq4z4xr8herhub5utr59d4gtkm53rwrobeqo3fm.c-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: tax37_0813d73270d3 X-Filterd-Recvd-Size: 1879 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf29.hostedemail.com (Postfix) with ESMTP for ; Tue, 8 Sep 2020 07:56:37 +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 8166FB6D7; Tue, 8 Sep 2020 07:56:37 +0000 (UTC) From: Oscar Salvador To: akpm@linux-foundation.org Cc: 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 v2 4/5] mm,hwpoison: Drop unneeded pcplist draining Date: Tue, 8 Sep 2020 09:56:25 +0200 Message-Id: <20200908075626.11976-5-osalvador@suse.de> X-Mailer: git-send-email 2.13.7 In-Reply-To: <20200908075626.11976-1-osalvador@suse.de> References: <20200908075626.11976-1-osalvador@suse.de> X-Rspamd-Queue-Id: 2BF801819E766 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam02 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: memory_failure and soft_offline_path paths now drain pcplists by calling get_hwpoison_page. memory_failure flags the page as HWPoison before, so that page cannot longer go into a pcplist, and soft_offline_page only flags a page as HWPoison if 1) we took the page off a buddy freelist 2) the page was in-use and we migrated it 3) was a clean pagecache. Because of that, a page cannot longer be poisoned and be in a pcplist. Signed-off-by: Oscar Salvador --- mm/madvise.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/mm/madvise.c b/mm/madvise.c index e92e06890b08..e7cdfabd8aca 100644 --- a/mm/madvise.c +++ b/mm/madvise.c @@ -930,10 +930,6 @@ static int madvise_inject_error(int behavior, return ret; } - /* Ensure that all poisoned pages are removed from per-cpu lists */ - for_each_populated_zone(zone) - drain_all_pages(zone); - return 0; } #endif