From patchwork Wed Jun 24 15:01:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naoya Horiguchi X-Patchwork-Id: 11623367 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AF78A60D for ; Wed, 24 Jun 2020 15:02:17 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7BB31206EB for ; Wed, 24 Jun 2020 15:02:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="LNH0aJZT" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7BB31206EB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 00C5D6B0008; Wed, 24 Jun 2020 11:02:16 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id EFE736B000A; Wed, 24 Jun 2020 11:02:15 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DEDF86B000C; Wed, 24 Jun 2020 11:02:15 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0140.hostedemail.com [216.40.44.140]) by kanga.kvack.org (Postfix) with ESMTP id C41AD6B0008 for ; Wed, 24 Jun 2020 11:02:15 -0400 (EDT) Received: from smtpin18.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 7DDC998B7 for ; Wed, 24 Jun 2020 15:02:15 +0000 (UTC) X-FDA: 76964421030.18.grass06_450f60126e45 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin18.hostedemail.com (Postfix) with ESMTP id CD5F31004E308 for ; Wed, 24 Jun 2020 15:01:46 +0000 (UTC) X-Spam-Summary: 1,0,0,6c97b886f2877ef6,d41d8cd98f00b204,nao.horiguchi@gmail.com,,RULES_HIT:41:69:355:379:541:800:966:967:968:973:982:988:989:1260:1345:1437:1535:1542:1711:1730:1747:1777:1792:2196:2199:2393:2525:2559:2564:2682:2685:2859:2899:2933:2937:2939:2942:2945:2947:2951:2954:3022:3138:3139:3140:3141:3142:3353:3865:3866:3867:3868:3870:3871:3872:3874:3934:3936:3938:3941:3944:3947:3950:3953:3956:3959:4250:4321:4362:4385:4605:5007:6119:6261:6653:8660:8784:8957:9025:9391:9413:9707:10004:11026:11232:11473:11658:11914:12043:12291:12296:12297:12438:12517:12519:12555:12679:12683:12986:13141:13148:13161:13205:13229:13230:14096:14181:14394:14721:21060:21080:21094:21323:21433:21444:21451:21627:21666:21740:21749:21811:21819:21939:21990:22119:30054:30070,0,RBL:209.85.216.66:@gmail.com:.lbl8.mailshell.net-66.100.201.100 62.50.0.100;04yrmcs7now5nb91smq8c5xcyfkriyc4e3ftqqgnmho6y9iuik5iianehf747ko.93cfeqpuk4yeqsdghoyprsjw3zb9bacmpxo8kxeuteatosspuchomau9w5hyc3p.e-lbl8.mailshell.net-223.238 .255.100 X-HE-Tag: grass06_450f60126e45 X-Filterd-Recvd-Size: 5336 Received: from mail-pj1-f66.google.com (mail-pj1-f66.google.com [209.85.216.66]) by imf21.hostedemail.com (Postfix) with ESMTP for ; Wed, 24 Jun 2020 15:01:43 +0000 (UTC) Received: by mail-pj1-f66.google.com with SMTP id ne5so1266760pjb.5 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=HQnn7fnKZplz/ap2KSgEP1oSTJrewhrb8B6xZsfE2M8Z+4Qs9qSV/48mClSp4yNUhy wze/JDCySLb8ddd4EcGj90NFByQg6CZ3Ix7a/v2po6cyr0h58tqXI5i70Kto8fbzPveS HqSSsmOyDjcllWXAzKi2Mn5O+8T7H2bAVDgX67o5YVTbhSJYluzi1wZjXF4dCejZmB6n vLey812cEM7wab0TrPgwW94I/4xz9JiagPJ7bo4Hz7talgXHbEnbln8YDlqBEdhtpNNn DpJts1RX5W5hV3lTK5RCudkwT7WXyJ24TQe0ItEZRu1F0UY9wLke91iJs6HTGfx4IUEl j25w== X-Gm-Message-State: AOAM531OnJgUA+o/pqncI0XrofJIkbvfYh40Zwe7jHDvlSpC/hVPw8+b l3XTtgtIKwggU9U/CjOt40+gKFLltQ== X-Google-Smtp-Source: ABdhPJy0MIbYK35VfmoGi9P4OYaen8i194NRhzg25e9pkT997Hdx1akqVNawblxcg8nBy/kJHn6hkg== 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 X-Rspamd-Queue-Id: CD5F31004E308 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam02 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000707, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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 Signed-off-by: Oscar Salvador --- 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(-)