From patchwork Sat Aug 17 08:49:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 13767067 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6B497C52D7D for ; Sat, 17 Aug 2024 08:54:08 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E51266B0281; Sat, 17 Aug 2024 04:54:07 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D59326B017F; Sat, 17 Aug 2024 04:54:07 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B82686B0281; Sat, 17 Aug 2024 04:54:07 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 924FA6B017F for ; Sat, 17 Aug 2024 04:54:07 -0400 (EDT) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 0EE2CA6780 for ; Sat, 17 Aug 2024 08:54:07 +0000 (UTC) X-FDA: 82461125334.22.897ECFA Received: from szxga05-in.huawei.com (szxga05-in.huawei.com [45.249.212.191]) by imf09.hostedemail.com (Postfix) with ESMTP id 2570C14001C for ; Sat, 17 Aug 2024 08:54:03 +0000 (UTC) Authentication-Results: imf09.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf09.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.191 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1723884831; a=rsa-sha256; cv=none; b=0BZG3VtPUkgxmvnBBLalXminlYxqEsy27Dj9oEZgOJ8eygcxs/1gq5cWbw/PeMNVX0yRJ0 Qmf363AbCIXMh97Y6cGp1ko4bVVw47MP0jEuX+9IS3Y29KfgY1XJ2OWnQKWVCqYmIKsS92 NWyc+VnX7SR+G8tXktLGB2US7PASoBM= ARC-Authentication-Results: i=1; imf09.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf09.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.191 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1723884831; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:in-reply-to: references; bh=iDYBTMyM3O6qs8hJswECz+6KlUetBXbxQzDWwJg+WjI=; b=xKNyo9NRkTo7QV8Gms42aGIJ6gagZz3GmJ2hPf8Q4DLSZcBGoM9+n0BoLpZN5ciNo5G0zA /Cem7BZ6YiNHMbqg3kbZ1r+dkXY6tAK20gIfIj6E581r32rfgloaMLj5Mi+9SLiAtJqYEJ y7tJSViBLkdz5yVa4Tyli2dQY5BdcNs= Received: from mail.maildlp.com (unknown [172.19.163.17]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4WmCHv5D6xz1HFyn; Sat, 17 Aug 2024 16:50:51 +0800 (CST) Received: from dggpemf100008.china.huawei.com (unknown [7.185.36.138]) by mail.maildlp.com (Postfix) with ESMTPS id 52DBC1A0188; Sat, 17 Aug 2024 16:53:59 +0800 (CST) Received: from localhost.localdomain (10.175.112.125) by dggpemf100008.china.huawei.com (7.185.36.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Sat, 17 Aug 2024 16:53:58 +0800 From: Kefeng Wang To: Andrew Morton CC: David Hildenbrand , Oscar Salvador , Miaohe Lin , Naoya Horiguchi , , Kefeng Wang Subject: [PATCH resend v2 0/5] mm: memory_hotplug: improve do_migrate_range() Date: Sat, 17 Aug 2024 16:49:36 +0800 Message-ID: <20240817084941.2375713-1-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 X-Originating-IP: [10.175.112.125] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggpemf100008.china.huawei.com (7.185.36.138) X-Rspam-User: X-Rspamd-Queue-Id: 2570C14001C X-Rspamd-Server: rspam01 X-Stat-Signature: minmqc7ghwbbw6r1uh3wyzx86s18fr3j X-HE-Tag: 1723884843-175543 X-HE-Meta: U2FsdGVkX18bhC2dzxETKFSRG8W5466pzZyH7spwZ4lgkhxfFUsFrk/bOl4cqzasTQPbmdMZvbR0bWCZEyWNC8n8UZh6ajKe/LIuX0m95nWhtjFSzeCpF+3j43XpFg3syWGZosd4sS6dGi5f2K71i6bRDbQTmQaNUdTMBRVDe8jx7cIMIkZWDlEIRV6yKQO1PHhydQxZLUnhpuppjDYdbf5AsGAJiJUaI5pO6ILB1u0qfdzNqT+JbWJLiL1L9oyr32qhR3IKI0YhkDZv/INO2VTe4sIvelRsMlaftoXoEGTDGCx/3UvlZNBFWwj6BI/OniQoL3Lp7VWEnvQU7vu80+4xW57Q7b42yMUyiSVpvsXiyiLkh8R7wFxAF3WZBWekXdsNvYZOYB29WqRbb2uM0DPg+z+sP4Uzk4I/mV1Odz2RqwUcG05DnF0YvlFMrbL9T6Aymk2v0fMkts9n0inagVte8ExZ4DCA8ycuz2pBFQ5zaDrpkitYnGSEX7Jbb09n2LwzRrSuGdR9NTZKMOhv55Q4ayNHpkdVbewRP6p47cZdwSEykOdFFDNwWg+7E/RidfxkT1rRWxprTq0ru38HiQoKcPUlrXM0b1MP7dUXGHlI4BWWvJvmbMnqqHIgFcVXtZMiI3Ts5Sm3IiEelSUxcFMRmA3V2LYk5wgxC/r7H6UzVeTaEm5Fj6lYt6PTVUS+04l6GnP/lwpvOnv/KqKnchp2oRvwxo+G3RSwv7ldcAA9iOuRgMRl1YDYPCQhjVKvCsNGqo879+zxAsEUaJCFCi2FXH7FbRnZweAPjDea2Mp/yEJp97fyMXDaJ+TUmPhDD75xHJWl1kIl0c0n9Sf4VM9TdBKs0NuRbMvYWo5oCSncKphiI5F4qL8jJrxDmbstCm1OJzaK+RExhp+csDGNLYicYNHcE00do5D6xwK1b4fCDpnzRYSDY2tu9Ai7cDkmcVCQOdgEuta2dmTs9dg zNHdMzuZ 7CVfZ520fyHEXzloDeqdfg0SM1jneLMkfV9f0HVwlVhyIQPzBkDa+Lrm0sMV4YHaVEt4nXyfQtq3/TEs0Tr2jFNoTD9XAyYoKReeVMkzAfSgGd2g/Fg+Nv5C+OoQsDxpM1B/d9K8qME5Kl8B/3+x7wO44+1FhBEh4WALq/PxXwaTprpz33vNw5KdEw3BGsQ2G9PG6dtNWv5wa3gvDYvA/gwRQmbWzp8F57i/L3sHVlcRYHD4= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000010, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Unify hwpoisoned page handling and isolation of HugeTLB/LRU/non-LRU movable page, also convert to use folios in do_migrate_range(). v2-resend: - fix isolate_hugetlb() build error in patch1 v2: - address comments from David(eg, fix HWPoison check/use a folio for pfn calculation firstly) - fix lkp build errors for isolate_folio_to_list() - drop unnecessary comments and don't grab one more ref for hugetlb Kefeng Wang (5): mm: memory_hotplug: remove head variable in do_migrate_range() mm: memory-failure: add unmap_posioned_folio() mm: memory_hotplug: check hwpoisoned page firstly in do_migrate_range() mm: migrate: add isolate_folio_to_list() mm: memory_hotplug: unify Huge/LRU/non-LRU movable folio isolation include/linux/migrate.h | 3 ++ mm/internal.h | 9 +++++ mm/memory-failure.c | 89 +++++++++++++++++------------------------ mm/memory_hotplug.c | 62 ++++++++++++++-------------- mm/migrate.c | 27 +++++++++++++ 5 files changed, 105 insertions(+), 85 deletions(-)