Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp2716621rwb; Sun, 4 Sep 2022 23:32:44 -0700 (PDT) X-Google-Smtp-Source: AA6agR4H0xFB+HrVE/lka4LX7i/oQggJ/1xhmmzXZRR6uN3NiGieeGWwowt8Ls0SHHk5r2sW74fJ X-Received: by 2002:a17:907:d94:b0:73e:82a6:d284 with SMTP id go20-20020a1709070d9400b0073e82a6d284mr31171434ejc.392.1662359564588; Sun, 04 Sep 2022 23:32:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662359564; cv=none; d=google.com; s=arc-20160816; b=tbR8jnqH85FX5q6Oy5eBFH1qx4yRL1xUAXEZHFhdmBnkGsPPF91IAPxHtTkLuQ+GSS Me2fzU2QQSC8E9dvFMNMPFkY6iErzXtIs+mO1YWHd5SbAutmwcqUTSjb6EzAWEZmplSi +WupipW15c0UZeDpmr92Ue3CSzPdgeGh8fqYDLZvA/YeLHgZahCvsFm0+C6xqc3weQYh yZdlak+PcYqwc+8w9Zr3mX700PIqkCiIlXrvHUKn3D/zgKX+hqd166DkugSnUMgQZUr/ WCqSUuVaB1y/u9h8AL5NGTMjSzZVNkN7LGRrRap5p31V86FCZ2Jg1o9MihpXcqFBqjCi J3QQ== 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=/EmRqq41ljuA3anBfMzi/BhpJJzz0kXo70oG+iPsn5E=; b=vWBnA5A0VPfTbJtmHlaiEe2FeuG2u/EX7loLZ3V1/cvxkSpxzBNHm+aTzPCoKy3muQ 9KFTSR4j+sZh+o3fKlWcDk2o1hVWQJo97sa6iA6iCXwgRDrrXsYn/5DOg2sHlv4nOMNn 6UWL4l0xcjI17BWDx64mzYKK+uDYZeS3Szvw9D6o8484BzoqZDwfoAg5rxrQbBzObjUc 2Xl7OTDUGOOBLqJA3S8zpLwAQamwbaGCyQkReuFxTzKnsOufFuw58MoivEO9DVqUegKv 72blCsF2drWw+HL5XnV1DFZvCXaOSQuITPJbcwTs0GJcJJkMUqDZYA1iLFeK2ivNNPvc ZrpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b="k6f/GYzv"; 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 a10-20020a1709064a4a00b0074145082ee4si6534287ejv.899.2022.09.04.23.32.16; Sun, 04 Sep 2022 23:32:44 -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="k6f/GYzv"; 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 S236074AbiIEGWL (ORCPT + 99 others); Mon, 5 Sep 2022 02:22:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57878 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235786AbiIEGWK (ORCPT ); Mon, 5 Sep 2022 02:22:10 -0400 Received: from out2.migadu.com (out2.migadu.com [188.165.223.204]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0ADAC2D1E7 for ; Sun, 4 Sep 2022 23:22:08 -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=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 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: linux.dev 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, T_SCC_BODY_TEXT_LINE 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. 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(-)