From patchwork Tue Aug 30 12:35:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miaohe Lin X-Patchwork-Id: 12959265 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id C7E8EECAAD4 for ; Tue, 30 Aug 2022 12:36:40 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 634A76B0075; Tue, 30 Aug 2022 08:36:39 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 56FBA6B0074; Tue, 30 Aug 2022 08:36:39 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 261056B0075; Tue, 30 Aug 2022 08:36:39 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 09EAA6B0074 for ; Tue, 30 Aug 2022 08:36:39 -0400 (EDT) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id D8F9041166 for ; Tue, 30 Aug 2022 12:36:38 +0000 (UTC) X-FDA: 79856207676.04.7A51F02 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by imf19.hostedemail.com (Postfix) with ESMTP id 212711A001F for ; Tue, 30 Aug 2022 12:36:37 +0000 (UTC) Received: from canpemm500002.china.huawei.com (unknown [172.30.72.57]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4MH6Fh0mcwzHnV7; Tue, 30 Aug 2022 20:34:48 +0800 (CST) Received: from huawei.com (10.175.124.27) by canpemm500002.china.huawei.com (7.192.104.244) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Tue, 30 Aug 2022 20:36:34 +0800 From: Miaohe Lin To: , CC: , , Subject: [PATCH 1/6] mm, hwpoison: use ClearPageHWPoison() in memory_failure() Date: Tue, 30 Aug 2022 20:35:59 +0800 Message-ID: <20220830123604.25763-2-linmiaohe@huawei.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20220830123604.25763-1-linmiaohe@huawei.com> References: <20220830123604.25763-1-linmiaohe@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.124.27] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To canpemm500002.china.huawei.com (7.192.104.244) X-CFilter-Loop: Reflected ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1661862998; a=rsa-sha256; cv=none; b=BgURznQKGGxHQfSWjK7nEbpIP7ocpTIq1G1gnZRUMoL4yxWqtqFx0boZDzuKxgHFjRwLCO ieJM7zp/kBy9lH/mqsG/9x1gUyqlVgwR0K2WlRJQ7JpPdHFytPcvliPFZr6nQdPc9VYrjp hc84W8Bp7b3cZy732NUXY1o1tyq6yJw= ARC-Authentication-Results: i=1; imf19.hostedemail.com; dkim=none; spf=pass (imf19.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.189 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1661862998; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=I4E8HX7jVlpzlObdp7l9t4A2vZLO+WBcTPrMgqSR+jg=; b=4/iftO9iwK8pDNZrmXwQ/oKHm2/KjsUJqNWOXqpBuNKdX4LCwvQajMd0SRq/zjm55exxrh FUo5h2g3o0vFMkGcKfnVJpwa3bDPcuBLaA0UrqUKzg4q88DPzTZOexiaPQ2ZDth03snBa+ nTECoe2vRu/E9voQUnFSPvTuCuF/fn8= Authentication-Results: imf19.hostedemail.com; dkim=none; spf=pass (imf19.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.189 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com X-Rspam-User: X-Rspamd-Server: rspam11 X-Stat-Signature: e1ahcp9wgofp9tomh35p1d11k1bwf3ut X-Rspamd-Queue-Id: 212711A001F X-HE-Tag: 1661862997-989934 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: Use ClearPageHWPoison() instead of TestClearPageHWPoison() to clear page hwpoison flags to avoid unneeded full memory barrier overhead. Signed-off-by: Miaohe Lin Acked-by: Naoya Horiguchi --- 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 ebf16d177ee5..a923a6dde871 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c @@ -2128,7 +2128,7 @@ int memory_failure(unsigned long pfn, int flags) page_flags = p->flags; if (hwpoison_filter(p)) { - TestClearPageHWPoison(p); + ClearPageHWPoison(p); unlock_page(p); put_page(p); res = -EOPNOTSUPP;