From patchwork Mon Sep 5 06:21:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naoya Horiguchi X-Patchwork-Id: 12965474 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 55DE5ECAAD5 for ; Mon, 5 Sep 2022 06:22:10 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DE2DE8019F; Mon, 5 Sep 2022 02:22:09 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D92C08D0050; Mon, 5 Sep 2022 02:22:09 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C5A898019F; Mon, 5 Sep 2022 02:22:09 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id B43018D0050 for ; Mon, 5 Sep 2022 02:22:09 -0400 (EDT) Received: from smtpin26.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 88E71A1849 for ; Mon, 5 Sep 2022 06:22:09 +0000 (UTC) X-FDA: 79877036778.26.471C8A5 Received: from out2.migadu.com (out2.migadu.com [188.165.223.204]) by imf12.hostedemail.com (Postfix) with ESMTP id 0849C40078 for ; Mon, 5 Sep 2022 06:22:08 +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=1662358927; 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=/EmRqq41ljuA3anBfMzi/BhpJJzz0kXo70oG+iPsn5E=; b=k6f/GYzvNxbLuVoryjBSqJ4aoEL1gkkHoKbO7iCbgYit3VfsN+mI8HxrK/YzgxPreJDQHN DxJjk+fY5fYUqFnJ1KqCiyosUq09fCcUuEcc78RfisgpjwpW8YFbg2ZGe5T7R3j9LYZqSX ezeHiP6xfO16WFVz5evIVc7uhhZJBzs= From: Naoya Horiguchi To: linux-mm@kvack.org Cc: Andrew Morton , Miaohe Lin , David Hildenbrand , Mike Kravetz , Yang Shi , Oscar Salvador , Muchun Song , Jane Chu , Naoya Horiguchi , linux-kernel@vger.kernel.org Subject: [PATCH v2 0/4] mm, hwpoison: improve handling workload related to hugetlb and memory_hotplug Date: Mon, 5 Sep 2022 15:21:33 +0900 Message-Id: <20220905062137.1455537-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; imf12.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b="k6f/GYzv"; spf=pass (imf12.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 ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1662358929; a=rsa-sha256; cv=none; b=hwuf5YsIvrYo2//wxRn4L8FFAWpXFS3qUSjpnxW9iWmgZCEM1hznANNyG6jX+c/U/o8aiU cGp6RX128rMMuw2y7Ukh2Z/1JoMf8qYZFSfmiqYTydax5GMn0iCxKLcddEMX4nJaR7mLux gOsAOwHqDlgD0wPuixS2FEXu0UJFfVQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1662358929; 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=/EmRqq41ljuA3anBfMzi/BhpJJzz0kXo70oG+iPsn5E=; b=MFIMLfWfdscOY7Z9IfvGYVIOQLRIi7ws6rT/IuNKmyQYtOp/OsbZIAn3vpy2Hg7Xn/ltUY zxPuy5FUlHkEFZgGVd8q29Eq0GFzEfdATpwVGqTeCvZQGNZ++OoNs4Q0TimZfHdQu6OHiB RoGymbYrxgVbSBLOoNO8HnpuOFi3Bnc= X-Stat-Signature: hbfezwss3gmwp5pfgcsk5jecn3ycnpwm X-Rspamd-Queue-Id: 0849C40078 X-Rspam-User: Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b="k6f/GYzv"; spf=pass (imf12.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-Rspamd-Server: rspam07 X-HE-Tag: 1662358928-938385 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 tries to solve the issue among memory_hotplug, hugetlb and hwpoison. Based on the discussion on v1, this version goes in the direction of changing the behavior of memory hotplug for hwpoison: - hwpoison pages should not prevent memory hotremove, - memory block with hwpoison pages should not be onlined. I tested both with ACPI-based and sysfs-based memory hotplug, and passed basic testcases. Any comments and feedbacks would be appreciated. Thanks, Naoya Horiguchi v1: https://lore.kernel.org/linux-mm/20220427042841.678351-1-naoya.horiguchi@linux.dev/T --- Summary: Naoya Horiguchi (4): mm,hwpoison,hugetlb,memory_hotplug: hotremove memory section with hwpoisoned hugepage mm/hwpoison: move definitions of num_poisoned_pages_* to memory-failure.c mm/hwpoison: pass pfn to num_poisoned_pages_*() mm/hwpoison: introduce per-memory_block hwpoison counter arch/parisc/kernel/pdt.c | 5 ++--- drivers/base/memory.c | 36 ++++++++++++++++++++++++++++++++++++ include/linux/memory.h | 3 +++ include/linux/mm.h | 12 ++++++++++++ include/linux/swapops.h | 25 ------------------------- mm/internal.h | 8 -------- mm/memory-failure.c | 45 +++++++++++++++++++++++---------------------- mm/memory_hotplug.c | 22 +++++++++++----------- mm/sparse.c | 2 -- 9 files changed, 87 insertions(+), 71 deletions(-)