From patchwork Thu Jun 2 05:06:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naoya Horiguchi X-Patchwork-Id: 12867510 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 2C432C43334 for ; Thu, 2 Jun 2022 05:07:04 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8F4A66B0071; Thu, 2 Jun 2022 01:07:03 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8A4226B0072; Thu, 2 Jun 2022 01:07:03 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7DBFE6B0073; Thu, 2 Jun 2022 01:07:03 -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 6B30C6B0071 for ; Thu, 2 Jun 2022 01:07:03 -0400 (EDT) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 262C3B90 for ; Thu, 2 Jun 2022 05:07:02 +0000 (UTC) X-FDA: 79532111484.09.C67BA3B Received: from out1.migadu.com (out1.migadu.com [91.121.223.63]) by imf19.hostedemail.com (Postfix) with ESMTP id 27ED51A0058 for ; Thu, 2 Jun 2022 05:06:45 +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=1654146416; 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=SCBnvwHlKpwI3ER7b6V0rjnJzAjOrcaxxPRFAdzr+/8=; b=Wqew7a2yEOyPVrNX8SfcrVfbJq2orOlXM/nzLrt3Ryv+vT9tST+pgV0NgHoQvCIWDZjSWS iCCFmVMbsi26tS2jSGe9W2lwLl80Sop0b4lYLjNztTVZmVNul2atyE9mL+zcs9PlmlzwVP SdnKokjCsV+7B52H7zulystM7Pht1Aw= 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 v1 0/5] mm, hwpoison: enable 1GB hugepage support Date: Thu, 2 Jun 2022 14:06:26 +0900 Message-Id: <20220602050631.771414-1-naoya.horiguchi@linux.dev> MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: linux.dev X-Rspam-User: Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=Wqew7a2y; dmarc=pass (policy=none) header.from=linux.dev; spf=pass (imf19.hostedemail.com: domain of naoya.horiguchi@linux.dev designates 91.121.223.63 as permitted sender) smtp.mailfrom=naoya.horiguchi@linux.dev X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 27ED51A0058 X-Stat-Signature: bqsh5w6b4ay17ajwp4ug15ef3mzfhxxi X-HE-Tag: 1654146405-838233 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, This patchset enables memory error handling on 1GB hugepage. "Save raw error page" patch (1/4 of patchset [1]) is necessary, so it's included in this series (the remaining part of hotplug related things are still in progress). Patch 2/5 solves issues in a corner case of hugepage handling, which might not be the main target of this patchset, but slightly related. It was posted separately [2] but depends on 1/5, so I group them together. Patch 3/5 to 5/5 are main part of this series and fix a small issue about handling 1GB hugepage, which I hope will be workable. [1]: https://lore.kernel.org/linux-mm/20220427042841.678351-1-naoya.horiguchi@linux.dev/T/#u [2]: https://lore.kernel.org/linux-mm/20220511151955.3951352-1-naoya.horiguchi@linux.dev/T/ Please let me know if you have any suggestions and comments. Thanks, Naoya Horiguchi --- Summary: Naoya Horiguchi (5): mm, hwpoison, hugetlb: introduce SUBPAGE_INDEX_HWPOISON to save raw error page 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 include/linux/hugetlb.h | 24 ++++++++++++++++++++++++ include/linux/mm.h | 2 +- include/ras/ras_event.h | 1 - mm/hugetlb.c | 9 +++++++++ mm/memory-failure.c | 48 +++++++++++++++++++++--------------------------- 5 files changed, 55 insertions(+), 29 deletions(-)