From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C3215C636C9 for ; Fri, 16 Jul 2021 01:00:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9695B613E6 for ; Fri, 16 Jul 2021 01:00:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232713AbhGPBDb (ORCPT ); Thu, 15 Jul 2021 21:03:31 -0400 Received: from szxga03-in.huawei.com ([45.249.212.189]:11321 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231264AbhGPBD3 (ORCPT ); Thu, 15 Jul 2021 21:03:29 -0400 Received: from dggemv703-chm.china.huawei.com (unknown [172.30.72.54]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4GQt8f67j3z7tTX; Fri, 16 Jul 2021 08:56:02 +0800 (CST) Received: from dggema753-chm.china.huawei.com (10.1.198.195) by dggemv703-chm.china.huawei.com (10.3.19.46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2176.2; Fri, 16 Jul 2021 09:00:33 +0800 Received: from huawei.com (10.174.179.206) by dggema753-chm.china.huawei.com (10.1.198.195) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Fri, 16 Jul 2021 09:00:32 +0800 From: Bin Wang To: CC: , , , , , Subject: Re: Re: [PATCH] mm/hwpoison: dissolve error hugepages of file mapping Date: Fri, 16 Jul 2021 09:00:28 +0800 Message-ID: <20210716010028.1720-1-wangbin224@huawei.com> X-Mailer: git-send-email 2.29.2.windows.3 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.174.179.206] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To dggema753-chm.china.huawei.com (10.1.198.195) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Matthew, On Thu, 15 Jul 2021 at 16:22:40 +0100, Matthew Wilcox wrote: > How is that safe? If you're going to dissolve the huge page, you > need to figure out which subpage needs to have the HWPoison flag set. Thanks for your review. The p that we pass to the __page_handle_poison() is the error subpage. And we will move the HWPoison flag to subpage in the dissolve_free_huge_page(): if (PageHWPoison(head) && page != head) { SetPageHWPoison(page); ClearPageHWPoison(head); } Thanks, Bin Wang