Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2043512pxk; Mon, 14 Sep 2020 03:19:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxTsNBEEu+cyEPLgQeACJ+Ua8feoIQla7HLWFJ/b50Xwqkz2Wkv+l7QaHSBQzHXpXzfirF1 X-Received: by 2002:a05:6402:503:: with SMTP id m3mr16614155edv.45.1600078763863; Mon, 14 Sep 2020 03:19:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600078763; cv=none; d=google.com; s=arc-20160816; b=isNmzxW9WtQtQtfqZacjI0X+S5PlDABSfN1EGjr1PN1xqHPQd7em2IGY0Haa4WaBBW ePB+G2Lxl1wdRxce8T9/17I8WX4vC3h3aFLBh520PlW8L2N40GPvJtXfG6aYQN3IsStT Aoo0BKndMydRCQFqmgbKQGE29QXxrhltWth/RJC0kIr1wgD2/oI1PgkyaTvPIm9kTnYz VTMRTf8MUH18zWZINGfTIheUq9bYBpP+iWI4wUcQTdyZITYXq1zyR5mhLRIQZDAdYOv0 pBALYP2Q1VVvKRleqxY+pnFInHYviXFZi4OIQRTa+Czf71cQzc6kXXCFMpqEM9HA0Akx TIUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=/GkLUohBsTLkgP9zFFOqpr5jHo30HTlmftVR0uTh9qw=; b=HAquo7RbbJtw2BGdl2MZiHrwT1kksjEoouwEsJNMVpLGiLHiCk5svJoMrBsUEYdMAj q9rRkagW/Nymn3Gd2e+VN1fcoFxzjAjUXZA4thGiAsjPgY0T5+c4A5di9EqqNW0Vcg4E ZM+lbTMyxDGwsso+t9HJFYyqQ5RktlvrZcPhPaPXyBcTDEzmXt3FZcKu3fMT1lTAiSVF hFkTFCInkhco3kL66SRLv4RVqMwQVMxn2e+yyYgFLsOEzn1OJA8z+rr/zHFdX8eLEQWf MJnA2Exg6MLgtaJVEgGJoaz64iqUg+EDe3J6lIRMbk5NWXKw5Uk1ZjQRsM+NsBVULubq SnMA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o14si6381250ejc.648.2020.09.14.03.19.01; Mon, 14 Sep 2020 03:19:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726436AbgINKQ0 (ORCPT + 99 others); Mon, 14 Sep 2020 06:16:26 -0400 Received: from mx2.suse.de ([195.135.220.15]:44812 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726406AbgINKQG (ORCPT ); Mon, 14 Sep 2020 06:16:06 -0400 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 0F233B266; Mon, 14 Sep 2020 10:16:21 +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 , Oscar Salvador , Stephen Rothwell Subject: [PATCH v3 4/5] mm,hwpoison: drop unneeded pcplist draining Date: Mon, 14 Sep 2020 12:15:58 +0200 Message-Id: <20200914101559.17103-5-osalvador@suse.de> X-Mailer: git-send-email 2.13.7 In-Reply-To: <20200914101559.17103-1-osalvador@suse.de> References: <20200914101559.17103-1-osalvador@suse.de> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Link: https://lkml.kernel.org/r/20200908075626.11976-5-osalvador@suse.de Signed-off-by: Oscar Salvador Cc: Michal Hocko Cc: Naoya Horiguchi Cc: Oscar Salvador Cc: Qian Cai Cc: Tony Luck Signed-off-by: Andrew Morton Signed-off-by: Stephen Rothwell --- mm/madvise.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/mm/madvise.c b/mm/madvise.c index 4ce66bab53dd..4bac8e85497a 100644 --- a/mm/madvise.c +++ b/mm/madvise.c @@ -917,10 +917,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 -- 2.26.2