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 E78A8C07E9B for ; Sun, 11 Jul 2021 14:20:16 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6C9F461156 for ; Sun, 11 Jul 2021 14:20:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6C9F461156 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 192AC6B0081; Sun, 11 Jul 2021 10:20:16 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 142FE6B0082; Sun, 11 Jul 2021 10:20:16 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F25FE6B0083; Sun, 11 Jul 2021 10:20:15 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0192.hostedemail.com [216.40.44.192]) by kanga.kvack.org (Postfix) with ESMTP id CAC866B0081 for ; Sun, 11 Jul 2021 10:20:15 -0400 (EDT) Received: from smtpin17.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id D938318456677 for ; Sun, 11 Jul 2021 14:20:14 +0000 (UTC) X-FDA: 78350516748.17.9F94AF3 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by imf07.hostedemail.com (Postfix) with ESMTP id 2AE3B10036BA for ; Sun, 11 Jul 2021 14:20:13 +0000 (UTC) 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-Type: text/plain 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 X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 2AE3B10036BA X-Stat-Signature: gys6jegh9r49ikhkxpefqfu1ricp3amc Authentication-Results: imf07.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=huawei.com; spf=pass (imf07.hostedemail.com: domain of wangbin224@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=wangbin224@huawei.com X-HE-Tag: 1626013213-240408 Content-Transfer-Encoding: quoted-printable 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 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 spl= it > > huge pags in hugetlbfs_error_remove_page() or after. So I choose to=20 > > add a new count. >=20 > 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) solv= e > your problem with "/proc/kpageflag" approach, which is a recommended so= lution. 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 work= ed. 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 wil= l try to solve it. Thanks, Bin Wang