Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp653809ybt; Wed, 24 Jun 2020 08:05:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz0qPX/FnLQqoBYn/Y6RqOM4MGpRyqvSYILlyZgX4ZQYHleS4w4iPwy+8cZdNOzI6fstw+s X-Received: by 2002:a05:6402:1486:: with SMTP id e6mr26384142edv.99.1593011112938; Wed, 24 Jun 2020 08:05:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593011112; cv=none; d=google.com; s=arc-20160816; b=JaYaH4qK0JT/7U4RL9VIgK0KJaFLkqesevaGSAgvmXl1JzsocK/bq/m0yQApz14lCw 0fmo36h4mkDKEeYfnpwHkNlG/Xdk0S9A9gnz8nJCkbS6w/bDATutk+wltp4M02HBXu5b QPMDnsMrlwFW0V1xPIIgDmEimW07TRoW2oPW3HjZ9Kk1kz+XtNIQeeey+nxlcm83+Ese pRasFINPVU9ASJT+Om7BQtZU66vXtTkWGH7NvNPemVeJuuQpf6pcfeGeBmTfcyGBUtPb JvvfSxH23PJakkDlbl/C0+DnMrGWwwyQO1TQFZzdAuCTWB4wws7IZEwgfr5BNGzlz1rq tZjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=6s3VpyoFsgSZ3B6oAIdOh3RdCzhKLfaICUHf9hDLF48=; b=vyBjLTQ1JAZF7MixLlsPMg2q4HvvGc69SogDLIavgNgXUUM2gCDVO96fu2+8AIZ6BN Vtl9w7i8uMidK2Jq+T9/BZUgypnglqpdil0cSSXX1oOMvBFh6ntnWt8MHA6z6Geda+3b zTQSzjNu2cvNcVq+SzA6sFYE+pdZX8TimDkUSWl6WnLRQEh25xQuRK5OL3xYWW0lGPG6 HlZE8zlU/AYtWKso1mxAZYSgr9x8keHQYu1/a5bUr60589jNyQuVjQnDuPEN6BySKbce 29Aw+8GJeu4QsPsNOilLPlnlhUzO+mX2SdpaFhcFRUo0VH5NIMLma6jNc4B+3yjTbFB7 P5mA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=LNH0aJZT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id oi20si12625008ejb.571.2020.06.24.08.04.49; Wed, 24 Jun 2020 08:05:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=LNH0aJZT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404134AbgFXPDH (ORCPT + 99 others); Wed, 24 Jun 2020 11:03:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55470 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404131AbgFXPBn (ORCPT ); Wed, 24 Jun 2020 11:01:43 -0400 Received: from mail-pl1-x644.google.com (mail-pl1-x644.google.com [IPv6:2607:f8b0:4864:20::644]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 105E7C0613ED for ; Wed, 24 Jun 2020 08:01:43 -0700 (PDT) Received: by mail-pl1-x644.google.com with SMTP id j4so1164376plk.3 for ; Wed, 24 Jun 2020 08:01:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=6s3VpyoFsgSZ3B6oAIdOh3RdCzhKLfaICUHf9hDLF48=; b=LNH0aJZTIpw3O3toEvTwUb5sMIlFp6cAUGwKSbwkjKkQ/jzXvNQWLmAnScro//yCPY O1WdRzwSYzOgItXdBWAqxJg9VeNSOSvyey1jqUY0fQtWjs4EM2mFeom7U5+5jjlmNcYH JystW330pb4PhzoD8EpVBvVgLkYu8/3OtYawwVE3flpaPEWDmIBnVTaP1EULUbV/FfJD iPW2EBMWOQvH8ZoqbreMFGKnl3CI+Fmp0XhNlRMv1QORa41VG3HkF1ocPo+SRvjK4guS oeNbXdD/kMtG70lRpL7QQ/WWoiBof0jT3tBpjPlyjgcmhy/qu2SHCPt5CzkDIpw6VM0Q sfaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=6s3VpyoFsgSZ3B6oAIdOh3RdCzhKLfaICUHf9hDLF48=; b=BCFPvZnrTDweCmwE2F37vqM69PecrprcHYOVpUcKYqT7emN8wIv2B5PLy/V0hDk2DW 5uqDt473AtLqXBba0VCR45rEXevMWtD7a/U6jzRI/mzCPtN3qeudri/Kb4DJ9Nu3Xdkd ZfCNRhyazjN/IZaQKDF2nzT6dgCdKKnByPiBCNuYczFztihS2DlfbKQkvbQV/ReMRHdj DKPSP1gcAbZmdb3CaC5uW+xwed/0BAQFgE9hdc3hpkQN+Z/kFE32YUEX/yFf7+Oleomn V1pJf7GNT26TCHy4j5AetL4IuF2lmggmUV7xcJSg1UrRquEd/fFM90kJ7h7j4losZZeS sAFA== X-Gm-Message-State: AOAM532kzrXNoG3pc0xcjoDcAXdQfRVEKC/pCdDzebQz6DECnF5NWV2u QqEaaTJVa2mYBNrJH92L8w== X-Received: by 2002:a17:90a:ad87:: with SMTP id s7mr30269606pjq.225.1593010902533; Wed, 24 Jun 2020 08:01:42 -0700 (PDT) Received: from ip-172-31-41-194.ap-northeast-1.compute.internal (ec2-52-199-21-241.ap-northeast-1.compute.amazonaws.com. [52.199.21.241]) by smtp.gmail.com with ESMTPSA id i125sm17013705pgd.21.2020.06.24.08.01.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jun 2020 08:01:42 -0700 (PDT) From: nao.horiguchi@gmail.com To: linux-mm@kvack.org Cc: mhocko@kernel.org, akpm@linux-foundation.org, mike.kravetz@oracle.com, osalvador@suse.de, tony.luck@intel.com, david@redhat.com, aneesh.kumar@linux.vnet.ibm.com, zeil@yandex-team.ru, naoya.horiguchi@nec.com, linux-kernel@vger.kernel.org Subject: [PATCH v3 00/15] HWPOISON: soft offline rework Date: Wed, 24 Jun 2020 15:01:22 +0000 Message-Id: <20200624150137.7052-1-nao.horiguchi@gmail.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I rebased soft-offline rework patchset [1][2] onto the latest mmotm. The rebasing required some non-trivial changes to adjust, but mainly that was straightforward. I confirmed that the reported problem doesn't reproduce on compaction after soft offline. For more precise description of the problem and the motivation of this patchset, please see [2]. I think that the following two patches in v2 are better to be done with separate work of hard-offline rework, so it's not included in this series. - mm,hwpoison: Take pages off the buddy when hard-offlining - mm/hwpoison-inject: Rip off duplicated checks These two are not directly related to the reported problem, so they seems not urgent. And the first one breaks num_poisoned_pages counting in some testcases, and The second patch needs more consideration about commented point. Any comment/suggestion/help would be appreciated. [1] v1: https://lore.kernel.org/linux-mm/1541746035-13408-1-git-send-email-n-horiguchi@ah.jp.nec.com/ [2] v2: https://lore.kernel.org/linux-mm/20191017142123.24245-1-osalvador@suse.de/ Thanks, Naoya Horiguchi --- Summary: Naoya Horiguchi (7): mm,hwpoison: cleanup unused PageHuge() check mm, hwpoison: remove recalculating hpage mm,madvise: call soft_offline_page() without MF_COUNT_INCREASED mm,hwpoison-inject: don't pin for hwpoison_filter mm,hwpoison: remove MF_COUNT_INCREASED mm,hwpoison: remove flag argument from soft offline functions mm,hwpoison: introduce MF_MSG_UNSPLIT_THP Oscar Salvador (8): mm,madvise: Refactor madvise_inject_error mm,hwpoison: Un-export get_hwpoison_page and make it static mm,hwpoison: Kill put_hwpoison_page mm,hwpoison: Unify THP handling for hard and soft offline mm,hwpoison: Rework soft offline for free pages mm,hwpoison: Rework soft offline for in-use pages mm,hwpoison: Refactor soft_offline_huge_page and __soft_offline_page mm,hwpoison: Return 0 if the page is already poisoned in soft-offline drivers/base/memory.c | 2 +- include/linux/mm.h | 12 +- include/linux/page-flags.h | 6 +- include/ras/ras_event.h | 3 + mm/hwpoison-inject.c | 18 +-- mm/madvise.c | 39 +++--- mm/memory-failure.c | 331 ++++++++++++++++++++------------------------- mm/migrate.c | 11 +- mm/page_alloc.c | 63 +++++++-- 9 files changed, 233 insertions(+), 252 deletions(-)