From patchwork Fri Oct 7 01:07:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naoya Horiguchi X-Patchwork-Id: 13000835 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 2D595C433F5 for ; Fri, 7 Oct 2022 01:08:02 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 650546B0072; Thu, 6 Oct 2022 21:08:01 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5FFFC8E0001; Thu, 6 Oct 2022 21:08:01 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4A0576B0074; Thu, 6 Oct 2022 21:08:01 -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 366C06B0072 for ; Thu, 6 Oct 2022 21:08:01 -0400 (EDT) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 11E4E1C6C24 for ; Fri, 7 Oct 2022 01:08:01 +0000 (UTC) X-FDA: 79992366762.03.6D9B775 Received: from out2.migadu.com (out2.migadu.com [188.165.223.204]) by imf08.hostedemail.com (Postfix) with ESMTP id 6F5FB16001B for ; Fri, 7 Oct 2022 01:08:00 +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=1665104878; 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=4PsFfjeizUMHGv0WhgRRPa7WVxesnagcY058B1kh/Ig=; b=BtRiu1RO5hPQKU1Ev9TlZfS7kp4A7iM6SZpW6KMdGn2lBZvHa4e5JIcft1o0xarN96wPMN FHynmITx+IW7qZKmLGWjADETllyvSCZVhcaE0xqxjEintap25Cm4sCtvJEv8Jean+lXLyy UIpliklJkR7M7VxBIk61QHFdmqvYbrE= 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 v6 0/4] mm, hwpoison: improve handling workload related to hugetlb and memory_hotplug Date: Fri, 7 Oct 2022 10:07:02 +0900 Message-Id: <20221007010706.2916472-1-naoya.horiguchi@linux.dev> MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1665104880; a=rsa-sha256; cv=none; b=PSTBB7LEnROEZaBfoKf6+4OgIJthJYdIKZs+jA1hQWQLL8CY/eml/VIApuooGuuKofPdZo MA3pR118paY4HKOJn1kN6o1O1FikpWvH07aA1ZDUqWImYlqttVOnOSKkaZApYRWsKYTWug bdZhvKMQEn++vZkGIWBIgdQ/znLQGrM= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=BtRiu1RO; spf=pass (imf08.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-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1665104880; 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=4PsFfjeizUMHGv0WhgRRPa7WVxesnagcY058B1kh/Ig=; b=WkZhz+/bOAIa0nwAYsIRZ+fCN0ZVZcKqoCCc1tLyX61wBG7JtQ9OpJTZzuJUKHCamSm3FK Bovjxxj1Hn3Jp8m6kMMVZxvNn1+yU8UJ35RuznWwjop4bpAvX09SMdvo9G1QXioCT0HFd2 dM9ARdtNbscvkwV1JnN/vbuzO2QNIeY= X-Rspamd-Queue-Id: 6F5FB16001B X-Rspam-User: Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=BtRiu1RO; spf=pass (imf08.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-Stat-Signature: ucdd8jkuz8j7w519yy7djk6f4scweyrs X-Rspamd-Server: rspam04 X-HE-Tag: 1665104880-449283 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. In this patchset, memory hotplug handles hwpoison pages like below: - hwpoison pages should not prevent memory hotremove, - memory block with hwpoison pages should not be onlined. Changes in this version: - applied comments for previous versions (thank you, reviewers), - fixed a few build errors (sorry for making noises on linux-next), - unpoison_memory() properly cancels per-memblk hwpoison counter, - rebased onto akpm/mm-unstable on Oct 4. Thanks, Naoya Horiguchi v1: https://lore.kernel.org/linux-mm/20220427042841.678351-1-naoya.horiguchi@linux.dev/T v2: https://lore.kernel.org/linux-mm/20220905062137.1455537-1-naoya.horiguchi@linux.dev/T v3-5: https://lore.kernel.org/linux-mm/20220921091359.25889-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 | 40 +++++++++++++++++++++++++++ include/linux/hugetlb.h | 10 ++++--- include/linux/memory.h | 3 ++ include/linux/mm.h | 29 ++++++++++++++++++-- include/linux/swapops.h | 24 ++-------------- mm/hugetlb.c | 9 +++--- mm/internal.h | 8 ------ mm/memory-failure.c | 71 +++++++++++++++++++++++++++--------------------- mm/sparse.c | 2 -- 10 files changed, 125 insertions(+), 76 deletions(-)