From patchwork Wed Sep 21 09:13:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naoya Horiguchi X-Patchwork-Id: 12983452 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 35E05C6FA94 for ; Wed, 21 Sep 2022 09:15:55 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9980480007; Wed, 21 Sep 2022 05:15:54 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9207D6B0074; Wed, 21 Sep 2022 05:15:54 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7C10080007; Wed, 21 Sep 2022 05:15:54 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 6A06B6B0073 for ; Wed, 21 Sep 2022 05:15:54 -0400 (EDT) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 36D9B807C3 for ; Wed, 21 Sep 2022 09:15:54 +0000 (UTC) X-FDA: 79935535428.04.BC77129 Received: from out2.migadu.com (out2.migadu.com [188.165.223.204]) by imf28.hostedemail.com (Postfix) with ESMTP id 9FCD9C000C for ; Wed, 21 Sep 2022 09:15:53 +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=1663751751; 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=y5ZLNbG63SlokUUFvz2qbP26Ghit9Hx14l1hW4m/kAM=; b=mBuJvW5lKIPZwgtyYdPiU/o0a3OFbU+urpRpUQDsbY+Tp08B7TP9qCzzu8lfjjUbNH8zQv uJx4fDx3Xq40CPRDZRPNKYKLK1UvTAIZulWhiYnF45CwAr4zYJP4V16AD9JZqyHCYAw3fC lLAwjeTpnrEVHwQpul6bIYi/pBJt+wc= 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 v3 0/4] mm, hwpoison: improve handling workload related to hugetlb and memory_hotplug Date: Wed, 21 Sep 2022 18:13:55 +0900 Message-Id: <20220921091359.25889-1-naoya.horiguchi@linux.dev> MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: linux.dev ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1663751753; a=rsa-sha256; cv=none; b=1bzDrvja1/laELqBizGZwQgxgtGdmL4O2bWg/i+3BCO2gOEBT5OJ8JaieQbBsjwcLZrJ+Y MopxBXKNzZi+7G1TYiuO8QSF/tVDk5TKBo+N0+wm0QkHQgblHUg5hMK68tCU4UAX/05Uin jU8o0HrPWbZ9nCqnWYlvuCSiqkJwHYU= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=mBuJvW5l; spf=pass (imf28.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=1663751753; 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=y5ZLNbG63SlokUUFvz2qbP26Ghit9Hx14l1hW4m/kAM=; b=q8BJE2I1Piba3FC3Cd71GfLDflJ1R6eHHINho9suw4DbUK3Ma3HkOVfHF/Q7pnaZw67Ge8 ufI2loUUgU/VG6du8cKKEmavgreOQ2JCqAUIqqvUmEnia1B3UI6y4GUMZUHQ7IhTjKc59/ GXqguvEMN1vb7eBY0ezk2RSRMvHNaqw= X-Rspamd-Server: rspam06 X-Rspam-User: X-Stat-Signature: d6pb8br16jqr6fckkzgbgqeycizbemjh X-Rspamd-Queue-Id: 9FCD9C000C Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=mBuJvW5l; spf=pass (imf28.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-HE-Tag: 1663751753-385943 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 review over v2 by Miaohe (thank you!), 1/4 takes another approach to prevent hwpoisoned hugepages to be migrated (i.e. the corrupted data is accessed) in memory hotremove. 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. 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 v2: https://lore.kernel.org/linux-mm/20220905062137.1455537-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/hugetlb.h | 4 ++-- include/linux/memory.h | 3 +++ include/linux/mm.h | 13 +++++++++++ include/linux/swapops.h | 24 ++------------------ mm/hugetlb.c | 4 ++-- mm/internal.h | 8 ------- mm/memory-failure.c | 59 +++++++++++++++++++++++++++--------------------- mm/sparse.c | 2 -- 10 files changed, 93 insertions(+), 65 deletions(-)