Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp262759rwb; Thu, 6 Oct 2022 18:11:18 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7Zu9FAdvYMRxzT2h2KmG8WX7BtLNCYzvzMLIh4aBqkGe3xuvhaqgGsI7Mr3YoEMLP/GP7j X-Received: by 2002:a05:6402:3582:b0:459:c47d:1960 with SMTP id y2-20020a056402358200b00459c47d1960mr2306945edc.195.1665105078243; Thu, 06 Oct 2022 18:11:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665105078; cv=none; d=google.com; s=arc-20160816; b=gUYtZRyELj10/u+cUoZ8SgSTSrkb/u/ZV6QWdlPFPs91BVBkwLPtWd07neauTMp0Vz w+0jAy7TA5yugTVUDV188p2Q3zkOGOYWdpQYOqPMUl/lmWngAZa1DeCjty59htK1c/vF yR9Al5KTj+9vSrUPKIoWOLTr7c/QOlQIFgbu1W/9+i3xWmqtgeEyvNarrOyr/slIumPD 1VcGg5ldeD/qEtRAkbDbRaXbf5G1/a2i6jXIfIxdZCIEfhr/4wHowq0E4wCoF8HCv90M R2dZGudthBykootTVOrZXujZL6/Jo9anJjk+bqJZ8tzK053nZ8Krvg2pGqnNmXUZBxOM a0OA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=4PsFfjeizUMHGv0WhgRRPa7WVxesnagcY058B1kh/Ig=; b=DXeYu+GzlPpS0wBDu0xyVSvmlgV5q+EZam9ZUvL0mqYyPrPhrqZ8iPFhLH7dFRvk57 UAMHj4MKzoFyp8EGJJ/lymJBWPXaTmLwZcDIUYMb4GW024EIvt4E98d4FNv3Y0qvc+24 UOJ8VVaZEYlakExb/Ig0ry/bGbdscApY4lJNBAFxezQWOyLuWUTKM1qxOsa1RJGsTFrT J1080aCGlWTOytAshMu1CF4v5FTcomRi7ZNCuHqe6Nsohforzn2NF91r+6jyJy6BOoca mEYzUP8uhX5MHZcGreCp0PaaYqdq8EQdaTkfFG+b3Ch/LlEawkDOunskv7rESLCnKcjr hGeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=BtRiu1RO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ae8-20020a17090725c800b0078219af8361si949830ejc.883.2022.10.06.18.10.28; Thu, 06 Oct 2022 18:11:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=BtRiu1RO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232445AbiJGBID (ORCPT + 99 others); Thu, 6 Oct 2022 21:08:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38210 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232141AbiJGBIB (ORCPT ); Thu, 6 Oct 2022 21:08:01 -0400 Received: from out2.migadu.com (out2.migadu.com [188.165.223.204]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4307454CAA for ; Thu, 6 Oct 2022 18:07:59 -0700 (PDT) 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 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-)