From patchwork Wed Apr 27 04:28:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naoya Horiguchi X-Patchwork-Id: 12828276 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 A8E63C433EF for ; Wed, 27 Apr 2022 04:28:56 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 35A9E6B0073; Wed, 27 Apr 2022 00:28:56 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2E3766B0075; Wed, 27 Apr 2022 00:28:56 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 184376B0078; Wed, 27 Apr 2022 00:28:56 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.27]) by kanga.kvack.org (Postfix) with ESMTP id 043B96B0073 for ; Wed, 27 Apr 2022 00:28:56 -0400 (EDT) Received: from smtpin30.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id D43BE217CE for ; Wed, 27 Apr 2022 04:28:55 +0000 (UTC) X-FDA: 79401378630.30.82C43E7 Received: from out2.migadu.com (out2.migadu.com [188.165.223.204]) by imf30.hostedemail.com (Postfix) with ESMTP id 1C7578005E for ; Wed, 27 Apr 2022 04:28:47 +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=1651033733; 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=8fVc1RYJLxneaYYpgkElGllkQXs+OIbqjkeJxvpkd40=; b=lwmYMM60KvYA71LSYNLhz19i+hcScZCTCQic+ZW7X7VE5wcWypZN19REFGkaLs32k+kFFB OCJGDeMbmliV03TMQBNNArpQWaVTnWqDng6mJh3ljBcStrz1uYb/XuQnkO4o0+qmmu+j7m 6uHBgoF/q6po0EWcO9A1/xZOww+oWvY= From: Naoya Horiguchi To: linux-mm@kvack.org Cc: Andrew Morton , Miaohe Lin , David Hildenbrand , Mike Kravetz , Yang Shi , Oscar Salvador , Muchun Song , Naoya Horiguchi , linux-kernel@vger.kernel.org Subject: [RFC PATCH v1 0/4] mm, hwpoison: improve handling workload related to hugetlb and memory_hotplug Date: Wed, 27 Apr 2022 13:28:37 +0900 Message-Id: <20220427042841.678351-1-naoya.horiguchi@linux.dev> MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: linux.dev X-Stat-Signature: jczih4y1juac5sp1opujxay7zf39cq8x Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=lwmYMM60; spf=pass (imf30.hostedemail.com: domain of naoya.horiguchi@linux.dev designates 188.165.223.204 as permitted sender) smtp.mailfrom=naoya.horiguchi@linux.dev; dmarc=pass (policy=none) header.from=linux.dev X-Rspam-User: X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 1C7578005E X-HE-Tag: 1651033727-175566 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 addresses some issues on the workload related to hwpoison, hugetlb, and memory_hotplug. The problem in memory hotremove reported by Miaohe Lin [1] is mentioned in 2/4. This patch depends on "storing raw error info" functionality provided by 1/4. This patch also provide delayed dissolve function too. Patch 3/4 is to adjust unpoison to new semantics of HPageMigratable for hwpoisoned hugepage. And 4/4 is the fix for the inconsistent counter issue. [1] https://lore.kernel.org/linux-mm/20220421135129.19767-1-linmiaohe@huawei.com/ Please let me know if you have any suggestions and comments. Thanks, Naoya Horiguchi --- Summary: Naoya Horiguchi (4): mm, hwpoison, hugetlb: introduce SUBPAGE_INDEX_HWPOISON to save raw error page mm,hwpoison,hugetlb,memory_hotplug: hotremove memory section with hwpoisoned hugepage mm, hwpoison: add parameter unpoison to get_hwpoison_huge_page() mm, memory_hotplug: fix inconsistent num_poisoned_pages on memory hotremove include/linux/hugetlb.h | 29 +++++++++++++++++++++++++++-- mm/hugetlb.c | 24 ++++++++++++++++++++++-- mm/memory-failure.c | 8 ++++++-- mm/memory_hotplug.c | 23 +++++++++++------------ mm/page_alloc.c | 6 ++++++ 5 files changed, 72 insertions(+), 18 deletions(-)