From patchwork Mon Oct 24 06:20:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naoya Horiguchi X-Patchwork-Id: 13016716 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 3EAF9C3A59D for ; Mon, 24 Oct 2022 06:20:29 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C003A8E0002; Mon, 24 Oct 2022 02:20:28 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BB08B8E0001; Mon, 24 Oct 2022 02:20:28 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A9F498E0002; Mon, 24 Oct 2022 02:20:28 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 9AF8A8E0001 for ; Mon, 24 Oct 2022 02:20:28 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 610F112075E for ; Mon, 24 Oct 2022 06:20:28 +0000 (UTC) X-FDA: 80054843736.14.0CD59CB Received: from out0.migadu.com (out0.migadu.com [94.23.1.103]) by imf19.hostedemail.com (Postfix) with ESMTP id B8EA61A0037 for ; Mon, 24 Oct 2022 06:20:27 +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=1666592426; 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=83UJL5fJPtb/iVfLXDHgaxM+tRPdlO0Uy7hw8QI04yQ=; b=CDLMPJfcld1kZNeMeqAbrlvCnzZ/OK2XZ81Y2BFtg3E0YU8IbocxFsMD5CzOStZYacCukJ M3a4vMXpeiHtj4dqkri19AtbpgFZxC4uG0JxaCObs8ntpXFZipTBuQLhbeCqoHmFAhpn4v 9T7C/Dxpmee+5B7zuqNvnFTPqx3FTKo= 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 v7 0/4] mm, hwpoison: improve handling workload related to hugetlb and memory_hotplug Date: Mon, 24 Oct 2022 15:20:08 +0900 Message-Id: <20221024062012.1520887-1-naoya.horiguchi@linux.dev> MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT ARC-Authentication-Results: i=1; imf19.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=CDLMPJfc; spf=pass (imf19.hostedemail.com: domain of naoya.horiguchi@linux.dev designates 94.23.1.103 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=1666592428; a=rsa-sha256; cv=none; b=N15Cj/qzFDofi8P6+81xnFjabk72+3L3EXYYwgl+EWG+BpacVB/bMVHFvJJJosho+tRF/8 REpxDJ29oPGy5HodF9ng7vbl7rz/I5oitH1y/HoY328HefmOTNTrFVBY1zEl4U14CVFGg5 t/ISoBjxg3qfIkWWBo+6+yemILeL8XM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1666592428; 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=83UJL5fJPtb/iVfLXDHgaxM+tRPdlO0Uy7hw8QI04yQ=; b=Y3GN7aIoZPKtkBtHVzOnpCFtkN9NRKW2YGH1pcsJ+bCwAeKLZkTsdyxWDSI5rNthGjRZAA 0kl57M/SnCmatHiJ9GBV6o1tqAdYoeTJqg+h3jrkjaqpGsuxnxs2s5qGtfClm7JOosDLzH h0TW/Tyj4Yx33cXCtpmbknkaMubThts= X-Stat-Signature: k5knio11w6sqtt4fiixrfqgwxrsg4com X-Rspamd-Queue-Id: B8EA61A0037 X-Rspam-User: Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=CDLMPJfc; spf=pass (imf19.hostedemail.com: domain of naoya.horiguchi@linux.dev designates 94.23.1.103 as permitted sender) smtp.mailfrom=naoya.horiguchi@linux.dev; dmarc=pass (policy=none) header.from=linux.dev X-Rspamd-Server: rspam06 X-HE-Tag: 1666592427-420912 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: - (patch 1/4) determine migratable_cleared atomically by introducing TESTCLEARHPAGEFLAG (suggested by Miaohe), - (patch 4/4) cleaned up declarations of counter API, - rebased onto akpm/mm-unstable on Oct 23. 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 v6: https://lore.kernel.org/linux-mm/20221007010706.2916472-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 | 38 ++++++++++++++++++++++++++ include/linux/hugetlb.h | 19 ++++++++++--- 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 | 69 ++++++++++++++++++++++++++---------------------- mm/sparse.c | 2 -- 10 files changed, 130 insertions(+), 76 deletions(-)