From patchwork Tue Jul 11 05:50:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miaohe Lin X-Patchwork-Id: 13308135 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 45133C001DE for ; Tue, 11 Jul 2023 05:50:12 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D2FCA8D0001; Tue, 11 Jul 2023 01:50:10 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C07898E0005; Tue, 11 Jul 2023 01:50:10 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 841EB8E0002; Tue, 11 Jul 2023 01:50:10 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 61D278D0001 for ; Tue, 11 Jul 2023 01:50:10 -0400 (EDT) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 2BB6B1C73C0 for ; Tue, 11 Jul 2023 05:50:10 +0000 (UTC) X-FDA: 80998255380.22.4A9FDE5 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by imf13.hostedemail.com (Postfix) with ESMTP id E1C7320005 for ; Tue, 11 Jul 2023 05:50:07 +0000 (UTC) Authentication-Results: imf13.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf13.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.255 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1689054608; 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: references; bh=PTUs9fnf6qglCNYEoHy2nn9Je4PMMxstCG6tUaiVGqs=; b=i7gJQf+VwHXKXO/znlj41F8544foaV7TuAvUjF0JPb6W3eYFVxQVQn5hLQJzI8L6N4zzVm 2QsfZ9CW+MK7MubWqzdJ2wwK8Y3wEhuZJD1S1Ff2w8MRRgsPD/rGrcQC6cO39m/wF74QQu +e6jdCsTDx55qZkdLpOhJoa9IGPQnrE= ARC-Authentication-Results: i=1; imf13.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf13.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.255 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1689054608; a=rsa-sha256; cv=none; b=ZYqtcsH0thimGU3FFEAErqoA2qXbuosuSxSxWh3JzPpuL1ResoP5Jiyh97LGdluzYKw0ak NnTsBkYKGqxR260UXtDzU1Lx8wXLPhcR0lzAHxanYJdvoUAQRAQgJKa2GK+SZfmdvPg1B0 3Eb3AkKRlspJnrJQUwiRxNRP0H1ofUE= Received: from canpemm500002.china.huawei.com (unknown [172.30.72.53]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4R0VLc3pLKz1FDmR; Tue, 11 Jul 2023 13:49:28 +0800 (CST) Received: from huawei.com (10.174.151.185) 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.2507.27; Tue, 11 Jul 2023 13:50:01 +0800 From: Miaohe Lin To: , CC: , , Subject: [PATCH v2 0/8] A few fixup and cleanup patches for memory-failure Date: Tue, 11 Jul 2023 13:50:08 +0800 Message-ID: <20230711055016.2286677-1-linmiaohe@huawei.com> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 X-Originating-IP: [10.174.151.185] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To canpemm500002.china.huawei.com (7.192.104.244) X-CFilter-Loop: Reflected X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: E1C7320005 X-Stat-Signature: 8asrt84bwfbsjbm3zati68e1xhy6e7pu X-Rspam-User: X-HE-Tag: 1689054607-24969 X-HE-Meta: U2FsdGVkX1+BGvJ8+9AMAkK+dlXJb/Apb5Y6MAFW5VzbCaTeE2cGDvusaoW5QC/1HUyEuKoZF+35fbxvSJy9kC0kEr2GCNVDF5AX7VcYPOtrAWSHOuPYtihgULqUY0ukZlPEsgnLwdNba+QMOBSQuX58BDv8thrXw+36c5FR0m3SGKaUGflP+0WqHcjId7ciGEXX7r0cEg9sqNyXGitIS6g7iu++7U8P8yoqywX3i+DlYZ2mZ8wG4JQs8Htc2fUkhyKTACrGmvcwe9NZjutPGthLQ6krdl8ro2ohxZZ67Typq3RoE933HjvAUkwEkhFXEZNFKqQDn0SA2UblDJZXuC1HnJV03fcyAeQJzq0SZYHab6w73XeQHcf73MuPHwhq1EPcxGdfwtQQ/duvhzhN6MG/oa2yJ5jbzdvIGLWf6b8EMtrta4Up5+GbTH4pshYIKewPqhhI018hCiLWdbOjV4+muzMZd9pMMoNZMeInUCVvSnfezC4VytQfSaIkZgswEmftEgFLLw9pb0HZdIfHqpmKcBv9aYgW/RC9kHmOGft/cKl5NUgN7YL5kq+hV5VDtrmD8ULFY0Somt90DH44YHaIEah0O+kTN4K1+DrVVn0uJLkbLZZ7DrAeIKiYYb1RlL4i/S4R2D8NGd3Em/7vNia1KPIo1cWMrWbwEdbxGQyYYnz34JKRf/0VXPO0Q/AIpcXlUGe9OG7fe1+HCcIELFajVY4Db4Pq7QZnegzHbRm9ddBBshVnOXlNf8OUNkOj8GAPmc+84TXbuxtTqiW0CE7VhAAmNK7Jw3Sm+RkkdiizIZuXHmWN1fNg5xuTNDiNj7CNrrtpWh67voGN97O8aQq+G2LiOl4wrwLpl1+BDqHn6juUVFQRLUI/lT46PdmULWpJR+WWXW69Fb2OI1IanOsFIFvp0NzuMjEYUHnTG1gxW09oSMCHWlqyPLAH9s1P0VoLjJ6APIfQ/sF7BXM fsbCD16f JgVLZ2k9v75qtMolgBGIvsRVf0LXqZM1koFXJiqoxDL3AJ1V50gQn9ubD0sfeiRZ0hlUCxHEKEzi4HLBh1UWlZpUEQLRv//ccO3ku7KaMPKPRRfm+P7EqVFqqeQ== 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: Hi everyone, This series contains a few fixup patches to fix inaccurate mf_stats, fix race window when trying to get hugetlb folio and so on. Also there is minor cleanup for comments and codestyle. More details can be found in the respective changelogs. Thanks! --- v2 collect Acked-by tag per Naoya 1/8: Change to simply remove the dead code per Naoya 8/8: Add some short comment about the race against demotion per Naoya Thanks Naoya for review. --- Miaohe Lin (8): mm: memory-failure: remove unneeded PageHuge() check mm: memory-failure: ensure moving HWPoison flag to the raw error pages mm: memory-failure: Don't account hwpoison_filter() filtered pages mm: memory-failure: use local variable huge to check hugetlb page mm: memory-failure: remove unneeded header files mm: memory-failure: minor cleanup for comments and codestyle mm: memory-failure: fetch compound head after extra page refcnt is held mm: memory-failure: fix race window when trying to get hugetlb folio mm/memory-failure.c | 50 ++++++++++++++++++++++++++------------------- 1 file changed, 29 insertions(+), 21 deletions(-)