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: 11838 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp265006vqm; Mon, 10 Jul 2023 22:55:01 -0700 (PDT) X-Google-Smtp-Source: APBJJlErl37gHVcyf227mnpyLoWhpkof1ki8HZmkyFPRvis2OlbQXFymLGJ4oSQhrbSFtroudsMr X-Received: by 2002:a17:907:7f89:b0:98d:cacb:888f with SMTP id qk9-20020a1709077f8900b0098dcacb888fmr20246477ejc.49.1689054901131; Mon, 10 Jul 2023 22:55:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689054901; cv=none; d=google.com; s=arc-20160816; b=iH1rFWinYQpGsc+hJSOXSa+yNQeSS59fDFgOD2SP4MW7+cw/Ln+fH7z0fevXnMpVQG rj5Xz00yUmBoma1fwinG3bJK9icbSrifBT8aixqM6UpdaEEHugTNl1vWjqe66mXhYBQl QMjRR8Fq/FLPkzjVuECGkpTTQoXtW+nEDqVXxMeUK2v11YdD1CRME6Iyr0z23OptrFcS Y62Tva4aC+qiPbjUHgx9r+by3WxeGNmnkUyLVbxVgtz0s+/iRIn4efepZLLFdahErlHF okRpMDfCPS7zNNiTXrZVEPAnMbnNy5QnIPUGhiToQEGlyV0HvE0vCYOnVo1HDsED5NH8 s6/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=PTUs9fnf6qglCNYEoHy2nn9Je4PMMxstCG6tUaiVGqs=; fh=4o7DIXI/66oHEW09L3854GeQKXh9nrvBy5ZxENMFBvA=; b=L5xGBeJrGTSUqFzbpvsJndnnOarMDDilgatpTNhc0nK0CslK3ZbzMkzsXEh7Kt2cwh PzD+Sy10cAswA2N3WcnKf4T1iGHFalQZSSY1TgIe70GSW9J8AJjclxnea/EWF9Z5tDPZ 03L+MWlpE0QjSkHA59ErbuQGJZcFz4Rwy2wlTNdd35XVAGIsiMpI/gMY5YuDlLEU7pwb nPDrCXTUZ2q8KUi3in7/JmLiiAa7hwmH69/UhDmp8l8cf1qSXAnjxra6H7sBvJWtaIqi BTKnkyvjZKVcDhGuA3ac/4j9uVp1DPGoqviN5Hv3tmdaBVVe67cnXx42PquanQ6uk60V yGRw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y5-20020a170906914500b00991c20fd371si1502310ejw.9.2023.07.10.22.54.37; Mon, 10 Jul 2023 22:55:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230227AbjGKFuM (ORCPT + 99 others); Tue, 11 Jul 2023 01:50:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229505AbjGKFuH (ORCPT ); Tue, 11 Jul 2023 01:50:07 -0400 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C934A1A2 for ; Mon, 10 Jul 2023 22:50:05 -0700 (PDT) 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-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771102431650436426 X-GMAIL-MSGID: 1771102431650436426 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(-)