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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5CA8DC43334 for ; Tue, 28 Jun 2022 02:06:12 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 942918E0002; Mon, 27 Jun 2022 22:06:11 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8F2388E0001; Mon, 27 Jun 2022 22:06:11 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7E1D58E0002; Mon, 27 Jun 2022 22:06:11 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 6BA9B8E0001 for ; Mon, 27 Jun 2022 22:06:11 -0400 (EDT) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 0D13A927 for ; Tue, 28 Jun 2022 02:06:11 +0000 (UTC) X-FDA: 79626004542.15.5F4BFB8 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by imf09.hostedemail.com (Postfix) with ESMTP id DA82514002E for ; Tue, 28 Jun 2022 02:06:09 +0000 (UTC) Received: from canpemm500002.china.huawei.com (unknown [172.30.72.55]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4LX7CK6zz1zShWs; Tue, 28 Jun 2022 10:02:37 +0800 (CST) Received: from [10.174.177.76] (10.174.177.76) 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.2375.24; Tue, 28 Jun 2022 10:06:06 +0800 Subject: Re: [PATCH v2 9/9] mm, hwpoison: enable memory error handling on 1GB hugepage To: Naoya Horiguchi , CC: Andrew Morton , David Hildenbrand , Mike Kravetz , Liu Shixin , Yang Shi , Oscar Salvador , Muchun Song , Naoya Horiguchi , References: <20220623235153.2623702-1-naoya.horiguchi@linux.dev> <20220623235153.2623702-10-naoya.horiguchi@linux.dev> From: Miaohe Lin Message-ID: <8bce5d0f-eb82-515f-b7c2-1a644dcebb92@huawei.com> Date: Tue, 28 Jun 2022 10:06:05 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <20220623235153.2623702-10-naoya.horiguchi@linux.dev> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.177.76] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To canpemm500002.china.huawei.com (7.192.104.244) X-CFilter-Loop: Reflected ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1656381970; a=rsa-sha256; cv=none; b=zFi+QdhXzHAcc9K3kEkTFHbeaKgTSDANZGMNPX+C9yyVFRMWBnqkGib4vSJ/SEwqnwKJWd ZiA31/jGEEksSunXllZnc90Kt7GPmXk/QJo6apex6/UMDRQD8dECG3P0pi1ZL+t6tI22j9 sAssTBXT8qlTgHiQHP59NUH+6OuiItc= ARC-Authentication-Results: i=1; imf09.hostedemail.com; dkim=none; spf=pass (imf09.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1656381970; 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:in-reply-to:references:references; bh=w+W0N2QI2IKT6uK0CGD7doMaxN/3XhYNIIp3EGrfqaw=; b=V1L0sSnTwjlv4SnZE6HxP90nIH61+n4HJxlgr31ZYOAZNjgmi4UwQylLfK0OWCS8d3Tp7B ocp7NDso2IEWmsH5O5xTsFhm+1gPInNh2hCSIJcrlvRhNssGYli1EQRb+6P35iFeOpfVF1 4gXBQeJujkWy4gpLM4QsCPQoekbk+X4= X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: DA82514002E Authentication-Results: imf09.hostedemail.com; dkim=none; spf=pass (imf09.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com X-Rspam-User: X-Stat-Signature: f4odb9mtfhnufuh16jr963cs1n7f5n71 X-HE-Tag: 1656381969-827981 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: On 2022/6/24 7:51, Naoya Horiguchi wrote: > From: Naoya Horiguchi > > Now error handling code is prepared, so remove the blocking code and > enable memory error handling on 1GB hugepage. > > Signed-off-by: Naoya Horiguchi The patch itself looks good to me. Reviewed-by: Miaohe Lin Thanks! BTW: There might still be some places need to be changed. Maybe we can process them altogether after this series is done? > --- > include/linux/mm.h | 1 - > include/ras/ras_event.h | 1 - > mm/memory-failure.c | 16 ---------------- > 3 files changed, 18 deletions(-) > > diff --git a/include/linux/mm.h b/include/linux/mm.h > index 044dc5a2e361..9d7e9b5a4d1d 100644 > --- a/include/linux/mm.h > +++ b/include/linux/mm.h > @@ -3284,7 +3284,6 @@ enum mf_action_page_type { > MF_MSG_DIFFERENT_COMPOUND, > MF_MSG_HUGE, > MF_MSG_FREE_HUGE, > - MF_MSG_NON_PMD_HUGE, > MF_MSG_UNMAP_FAILED, > MF_MSG_DIRTY_SWAPCACHE, > MF_MSG_CLEAN_SWAPCACHE, > diff --git a/include/ras/ras_event.h b/include/ras/ras_event.h > index d0337a41141c..cbd3ddd7c33d 100644 > --- a/include/ras/ras_event.h > +++ b/include/ras/ras_event.h > @@ -360,7 +360,6 @@ TRACE_EVENT(aer_event, > EM ( MF_MSG_DIFFERENT_COMPOUND, "different compound page after locking" ) \ > EM ( MF_MSG_HUGE, "huge page" ) \ > EM ( MF_MSG_FREE_HUGE, "free huge page" ) \ > - EM ( MF_MSG_NON_PMD_HUGE, "non-pmd-sized huge page" ) \ > EM ( MF_MSG_UNMAP_FAILED, "unmapping failed page" ) \ > EM ( MF_MSG_DIRTY_SWAPCACHE, "dirty swapcache page" ) \ > EM ( MF_MSG_CLEAN_SWAPCACHE, "clean swapcache page" ) \ > diff --git a/mm/memory-failure.c b/mm/memory-failure.c > index fc7b83cb6468..33521e059f7f 100644 > --- a/mm/memory-failure.c > +++ b/mm/memory-failure.c > @@ -728,7 +728,6 @@ static const char * const action_page_types[] = { > [MF_MSG_DIFFERENT_COMPOUND] = "different compound page after locking", > [MF_MSG_HUGE] = "huge page", > [MF_MSG_FREE_HUGE] = "free huge page", > - [MF_MSG_NON_PMD_HUGE] = "non-pmd-sized huge page", > [MF_MSG_UNMAP_FAILED] = "unmapping failed page", > [MF_MSG_DIRTY_SWAPCACHE] = "dirty swapcache page", > [MF_MSG_CLEAN_SWAPCACHE] = "clean swapcache page", > @@ -1717,21 +1716,6 @@ static int try_memory_failure_hugetlb(unsigned long pfn, int flags, int *hugetlb > > page_flags = head->flags; > > - /* > - * TODO: hwpoison for pud-sized hugetlb doesn't work right now, so > - * simply disable it. In order to make it work properly, we need > - * make sure that: > - * - conversion of a pud that maps an error hugetlb into hwpoison > - * entry properly works, and > - * - other mm code walking over page table is aware of pud-aligned > - * hwpoison entries. > - */ > - if (huge_page_size(page_hstate(head)) > PMD_SIZE) { > - action_result(pfn, MF_MSG_NON_PMD_HUGE, MF_IGNORED); > - res = -EBUSY; > - goto out; > - } > - > if (!hwpoison_user_mappings(p, pfn, flags, head)) { > action_result(pfn, MF_MSG_UNMAP_FAILED, MF_IGNORED); > res = -EBUSY; >