Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp4388807ioa; Wed, 27 Apr 2022 02:44:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzr8f6hE9HVW5eYyD1MqyTulMLKiGrK+Drtr09tP59IdworeMYZz7dPHu7ImFJvSz64VkkB X-Received: by 2002:a17:902:d2c4:b0:15d:391c:5a71 with SMTP id n4-20020a170902d2c400b0015d391c5a71mr6949349plc.94.1651052686331; Wed, 27 Apr 2022 02:44:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651052686; cv=none; d=google.com; s=arc-20160816; b=jFnjUxD49BPOWMEzQ3IgkA84N5eoNYzxx4tJh3VLZqjqTRUzLRPvR1A0cRS5lqfmu7 nzOQW9wNHCo+j7yRiB4DxyFJV19xck/ma6rIfCJSvu8xSMyXvEZt1vFxA8KP3/Yfu31q ccjgiK9vf1NGg9dMPyzDxZKW0LlWYhL5OEwa3jmeBzY4fompyc6nKRVP/q17w5DOWbUL RdIpW39zx6XUVOON/I1oQsda3Gqk5ZrVed5/gG0d1a5Qh2BgVb37d79yaAzn0EwyguJK uI8PNOP74v2zTzOdbBGUL7EVtN1saeBQE81iBvR6XRESTgUgvTc0I052UrzMX/EnEigH +EUg== 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=8fVc1RYJLxneaYYpgkElGllkQXs+OIbqjkeJxvpkd40=; b=0Dvn96yAPUAsSSdtzOtgD3LAn+fHCmMK+0I3mMaNswaoH7JgBgw10CZlJ1Wi+So35x QwdPk88+JhYBkVG2E1kOskilTIY0iK6PLnDMFv9L9rHhbL2GC5uaW/xoeU4da78W/tLp WpBN6hQNplEUYdS0+v/EZ/qvU9VdGipUUsDLJ7OHjjzkHl6FatWSz5Q2cqfEKLX7FNuW zDlQ3gyE5FW70WEaNkv1uwP5v+hMLv5GxCacLtGdb8Lr5I/eYOfB7/SYgQ6A82XBzmmZ IwesY3NnclSEXaPpTr1yS9XzUanx+SX5CuDsXK3Mar6JqNZft0hQh6GFmc4075CCuWw3 PfaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=lwmYMM60; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id g21-20020a62e315000000b0050d38031823si861264pfh.229.2022.04.27.02.44.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 02:44:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=lwmYMM60; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 01C0E284D65; Wed, 27 Apr 2022 02:19:11 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1357662AbiD0EcG (ORCPT + 99 others); Wed, 27 Apr 2022 00:32:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49540 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350114AbiD0EcE (ORCPT ); Wed, 27 Apr 2022 00:32:04 -0400 Received: from out2.migadu.com (out2.migadu.com [188.165.223.204]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F399713EBC for ; Tue, 26 Apr 2022 21:28:54 -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=1651033733; 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=8fVc1RYJLxneaYYpgkElGllkQXs+OIbqjkeJxvpkd40=; b=lwmYMM60KvYA71LSYNLhz19i+hcScZCTCQic+ZW7X7VE5wcWypZN19REFGkaLs32k+kFFB OCJGDeMbmliV03TMQBNNArpQWaVTnWqDng6mJh3ljBcStrz1uYb/XuQnkO4o0+qmmu+j7m 6uHBgoF/q6po0EWcO9A1/xZOww+oWvY= From: Naoya Horiguchi To: linux-mm@kvack.org Cc: Andrew Morton , Miaohe Lin , David Hildenbrand , Mike Kravetz , Yang Shi , Oscar Salvador , Muchun Song , Naoya Horiguchi , linux-kernel@vger.kernel.org Subject: [RFC PATCH v1 0/4] mm, hwpoison: improve handling workload related to hugetlb and memory_hotplug Date: Wed, 27 Apr 2022 13:28:37 +0900 Message-Id: <20220427042841.678351-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.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE autolearn=no 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 addresses some issues on the workload related to hwpoison, hugetlb, and memory_hotplug. The problem in memory hotremove reported by Miaohe Lin [1] is mentioned in 2/4. This patch depends on "storing raw error info" functionality provided by 1/4. This patch also provide delayed dissolve function too. Patch 3/4 is to adjust unpoison to new semantics of HPageMigratable for hwpoisoned hugepage. And 4/4 is the fix for the inconsistent counter issue. [1] https://lore.kernel.org/linux-mm/20220421135129.19767-1-linmiaohe@huawei.com/ Please let me know if you have any suggestions and comments. Thanks, Naoya Horiguchi --- Summary: Naoya Horiguchi (4): mm, hwpoison, hugetlb: introduce SUBPAGE_INDEX_HWPOISON to save raw error page mm,hwpoison,hugetlb,memory_hotplug: hotremove memory section with hwpoisoned hugepage mm, hwpoison: add parameter unpoison to get_hwpoison_huge_page() mm, memory_hotplug: fix inconsistent num_poisoned_pages on memory hotremove include/linux/hugetlb.h | 29 +++++++++++++++++++++++++++-- mm/hugetlb.c | 24 ++++++++++++++++++++++-- mm/memory-failure.c | 8 ++++++-- mm/memory_hotplug.c | 23 +++++++++++------------ mm/page_alloc.c | 6 ++++++ 5 files changed, 72 insertions(+), 18 deletions(-)