From patchwork Thu Jun 30 02:27:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naoya Horiguchi X-Patchwork-Id: 12900987 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 174D2C43334 for ; Thu, 30 Jun 2022 02:28:12 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 89F966B0073; Wed, 29 Jun 2022 22:28:11 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 851306B0074; Wed, 29 Jun 2022 22:28:11 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 719A48E0001; Wed, 29 Jun 2022 22:28:11 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 62AFA6B0073 for ; Wed, 29 Jun 2022 22:28:11 -0400 (EDT) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 3D47A67A for ; Thu, 30 Jun 2022 02:28:11 +0000 (UTC) X-FDA: 79633317582.04.D93D75E Received: from out2.migadu.com (out2.migadu.com [188.165.223.204]) by imf26.hostedemail.com (Postfix) with ESMTP id A7906140024 for ; Thu, 30 Jun 2022 02:28:10 +0000 (UTC) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1656556088; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=h/RgYaIOqxfF17jSa9I6epPt/ktZzShhlogXm62GIAw=; b=OMA3g9fZhnOKDtZEunrzD5CGHPWlUjn8/XGMWmDXyLDR27zHmHzzL+FdNvqbfGYjF5aCyA OW5m5jnwn3879CS7LKVwXBXzq/uLP7YkH/XBNMXrnqquu9QSIzwWJ6ujha+HBniCLh291M 693Zbw0onGxwpNhU1VEb9ntXaovY8mI= From: Naoya Horiguchi To: linux-mm@kvack.org Cc: Andrew Morton , David Hildenbrand , Mike Kravetz , Miaohe Lin , Liu Shixin , Yang Shi , Oscar Salvador , Muchun Song , Naoya Horiguchi , linux-kernel@vger.kernel.org Subject: [PATCH v3 0/9] mm, hwpoison: enable 1GB hugepage support (v3) Date: Thu, 30 Jun 2022 11:27:46 +0900 Message-Id: <20220630022755.3362349-1-naoya.horiguchi@linux.dev> MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: linux.dev ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=OMA3g9fZ; dmarc=pass (policy=none) header.from=linux.dev; spf=pass (imf26.hostedemail.com: domain of naoya.horiguchi@linux.dev designates 188.165.223.204 as permitted sender) smtp.mailfrom=naoya.horiguchi@linux.dev ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1656556090; a=rsa-sha256; cv=none; b=M9TVReUWQXPAyyDYXmq/5t9KwGz8Sh4izlftg/tZSNPCqrbaCslPUq5pwEvBQl0u4ZMQR1 Yk1AWJmcttczPyE1dgG/N0Jn+orj21TbBA1qsimKbUSH7+vji/t1OSA/cja95hRvgKOjaq SiRcCqe1Nj+/pra/q9sS/38P6GMreQ4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1656556090; 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-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=h/RgYaIOqxfF17jSa9I6epPt/ktZzShhlogXm62GIAw=; b=vs2U7SJ+UMYmCrcMEsaHjeb7r4HKRCrxXN2RcFmNEFhs0HeK7FjWmmFUfS0IziUyguGYul vhwLXjvw/pOy01YPWZbpVQme/1Kzxhvjuwqva0/6rYm5mJwILg/Dou5VcuP8gmpgqlAdqb 6Sff5vBky78dvndI84233m7F7LtW2r8= X-Rspam-User: Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=OMA3g9fZ; dmarc=pass (policy=none) header.from=linux.dev; spf=pass (imf26.hostedemail.com: domain of naoya.horiguchi@linux.dev designates 188.165.223.204 as permitted sender) smtp.mailfrom=naoya.horiguchi@linux.dev X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: A7906140024 X-Stat-Signature: be6b6szts5t64d5ckarbna8ngdp7ntie X-HE-Tag: 1656556090-339888 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: Here is v3 of "enabling memory error handling on 1GB hugepage" patchset. I applied feedbacks for v2, thank you very much. Overall design of the patchset is unchanged. Please see individual patches for details about changes. Patch dependency: - "mm/memory-failure: disable unpoison once hw error happens" (actually the conflict is not logical one, but adding MF_SIMULATED to mf_flags conflicts with patch 6/9.) Previous versions: - v1: https://lore.kernel.org/linux-mm/20220602050631.771414-1-naoya.horiguchi@linux.dev/T/#u - v2: https://lore.kernel.org/linux-mm/20220623235153.2623702-1-naoya.horiguchi@linux.dev/T/#u Thanks, Naoya Horiguchi --- Summary: Naoya Horiguchi (9): mm/hugetlb: check gigantic_page_runtime_supported() in return_unused_surplus_pages() mm/hugetlb: separate path for hwpoison entry in copy_hugetlb_page_range() mm/hugetlb: make pud_huge() and follow_huge_pud() aware of non-present pud entry mm, hwpoison, hugetlb: support saving mechanism of raw error pages mm, hwpoison: make unpoison aware of raw error info in hwpoisoned hugepage mm, hwpoison: set PG_hwpoison for busy hugetlb pages mm, hwpoison: make __page_handle_poison returns int mm, hwpoison: skip raw hwpoison page in freeing 1GB hugepage mm, hwpoison: enable memory error handling on 1GB hugepage arch/x86/mm/hugetlbpage.c | 8 ++- include/linux/hugetlb.h | 18 +++++- include/linux/mm.h | 2 +- include/linux/swapops.h | 9 +++ include/ras/ras_event.h | 1 - mm/hugetlb.c | 99 ++++++++++++++++++++++--------- mm/memory-failure.c | 148 ++++++++++++++++++++++++++++++++++++---------- 7 files changed, 224 insertions(+), 61 deletions(-)