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 C059CC07E96 for ; Sun, 11 Jul 2021 14:20:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 91A0C61167 for ; Sun, 11 Jul 2021 14:20:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233112AbhGKOXB (ORCPT ); Sun, 11 Jul 2021 10:23:01 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:10465 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232913AbhGKOXB (ORCPT ); Sun, 11 Jul 2021 10:23:01 -0400 Received: from dggemv704-chm.china.huawei.com (unknown [172.30.72.55]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4GN88z5Ql5zcc62; Sun, 11 Jul 2021 22:16:51 +0800 (CST) Received: from dggema753-chm.china.huawei.com (10.1.198.195) by dggemv704-chm.china.huawei.com (10.3.19.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2176.2; Sun, 11 Jul 2021 22:20:06 +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; Sun, 11 Jul 2021 22:20:06 +0800 From: Bin Wang To: CC: , , , , , , Subject: Re: Re: [PATCH v2] mm: hugetlb: add hwcrp_hugepages to record memory failure on hugetlbfs Date: Sun, 11 Jul 2021 22:20:01 +0800 Message-ID: <20210711142001.1780-1-wangbin224@huawei.com> X-Mailer: git-send-email 2.29.2.windows.3 In-Reply-To: <20210629080835.GA427744@u2004> References: <20210629080835.GA427744@u2004> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.174.179.206] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) 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 Naoya, > > Yes, splitting the huge pages and isolating a base page is ideal. And > > we do this with dissolve_free_huge_page() when page_mapping() return > > NULL. I think there is a reason(but I do not get it) why we don't split > > huge pags in hugetlbfs_error_remove_page() or after. So I choose to > > add a new count. > > Maybe the resource is the main reason of this incompleteness, I noticed this > for years and continued to say "this is in my todo list", but still don't > make it (really sorry about that...). Anyway, if you can (I hope) solve > your problem with "/proc/kpageflag" approach, which is a recommended solution. I do not understand the exact meaning of the "resource". I have tried to call dissolve_free_huge_page() after hugetlbfs_error_remove_page() and it worked. In my opinion, the error huge page has been truncated from the hugetlbfs. It cannot be accessed and allocated again. I think it is safe to split it. I would appreciate it if you could point out what I overlooked. And I will try to solve it. Thanks, Bin Wang