From patchwork Fri Aug 16 09:04:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 13765780 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 74198C3DA4A for ; Fri, 16 Aug 2024 09:05:14 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E23858D002B; Fri, 16 Aug 2024 05:05:13 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id DAC366B00AF; Fri, 16 Aug 2024 05:05:13 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C4E168D002B; Fri, 16 Aug 2024 05:05:13 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id A61C86B00AB for ; Fri, 16 Aug 2024 05:05:13 -0400 (EDT) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 2CBD1C19EA for ; Fri, 16 Aug 2024 09:05:13 +0000 (UTC) X-FDA: 82457524506.12.0C0A9DA Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by imf04.hostedemail.com (Postfix) with ESMTP id 4E64040013 for ; Fri, 16 Aug 2024 09:05:09 +0000 (UTC) Authentication-Results: imf04.hostedemail.com; dkim=none; spf=pass (imf04.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1723799098; 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=qglX8Qq2H/lLEb6oZTkG5YRsaRc2Qz/KVKOYDA40Eq8=; b=L8wp+mheuHX7WWHTdg0dcY1PaZwlysKC+KSLdSJaeFOigim0bFQ+6fEpAQNJkaimjOVZR7 dUXD7CpX9v7O8pnKF9Dsh38Rkq3n18dmfbjtXyGUWKTeEFZmGDkzFWzn1ZuDokq/BcgZqX K6zvU/jmPpBpJzKnyZwKsdBVp8Vd2fY= ARC-Authentication-Results: i=1; imf04.hostedemail.com; dkim=none; spf=pass (imf04.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1723799098; a=rsa-sha256; cv=none; b=PUTLPjv7a4bh+ZChU6VxRhwa8+ka5P7ruZw4TjGrTjVOaRBpO8T9UiDuI3OmN744eXzLWm 0ZvtrSMb/AHof7aExwX63DHMOERLr6p9TSUw0yw97oDieHkha7/wDxT+WE9oykmEmsFoYv Wx5wsoOc1i0TbSxXLg3JNEBNfIA3nFw= Received: from mail.maildlp.com (unknown [172.19.163.48]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4WlbdB1KWPzpTbF; Fri, 16 Aug 2024 17:03:42 +0800 (CST) Received: from dggpemf100008.china.huawei.com (unknown [7.185.36.138]) by mail.maildlp.com (Postfix) with ESMTPS id D6E2218006C; Fri, 16 Aug 2024 17:05:05 +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; Fri, 16 Aug 2024 17:05:05 +0800 From: Kefeng Wang To: Andrew Morton CC: David Hildenbrand , Oscar Salvador , Miaohe Lin , Naoya Horiguchi , , Kefeng Wang Subject: [PATCH v2 0/5] mm: memory_hotplug: improve do_migrate_range() Date: Fri, 16 Aug 2024 17:04:30 +0800 Message-ID: <20240816090435.888946-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: dggems704-chm.china.huawei.com (10.3.19.181) To dggpemf100008.china.huawei.com (7.185.36.138) X-Rspam-User: X-Stat-Signature: zkwp1hgnd9pazij6q4uopwdgrxz85xif X-Rspamd-Queue-Id: 4E64040013 X-Rspamd-Server: rspam11 X-HE-Tag: 1723799109-51289 X-HE-Meta: U2FsdGVkX19u+pmT3ZT7DUIirJV6hnw3z8HZI30mMEXjLCr9bgiSV4rE1/266vXjjYw1qlPSFWcUQuCfFsf+/Rfr47YWgnJdCQUEbnRiE9edXKvI4fy6h+Ff4BNsFZ7HlP9buu6zw0KiBQE0+sSndNEHVczhGa6nkFcr7xAXAsBC3+f5F3zoOf3YVNUtOmkYsw7eRpZ4/IxjGOt8xPL9ZQ5Iw6xT4LE9ncBH/eHKmDMTURc1WBZJK74QahplHehajpC2gKuB1BTQuaR7EVoQ0U7Z/stUrVZsZVM6HenW9AScw1qpffBJs35MIi3qHeI++yTKn1q4FuOlFP/e8Ts83YkhfWkcbO1HxEXgikNXYgQCAQ0mK2DHaHFj3OIds3mTg7fMmSYfezN3dm/eB41ZkrBegUB0eNBxvCMYhp87Pj5aULo+8Z2zS3GUayqKcIKemKRobjKHKZhGp4MRD9SlUGxn0w3zx5tIlutG+nBahk4ose8wzh8gm4HFzOaN0cbU0E25+31F/P1JJo4MSsz+ot90B1AU4JWcPzSwieAVg3nZh8kTjzRFGrRGpts+kYxr0LaY/jnC8QEeTEk2GmQKfQuThdkGapwyZ+Z+EC7Y+mtm5Dmj74ggfy8Yj28c6Q/pDf3IVV8spW/o/cTWEZ0s2WmF7pFiHHHypxrya3CP6Aop4/QU1TyfdPJALJm+cutoNkcTn1VPHMNWPJwfF+XInL2OBuTm2TUXeSFde8LwhxZRa8QvIGRhnosxR0Ug8cfm+DAnbaSCwD3rAA3IPI7URqMQLXZAm6pD6QkkhaJHKD4OawkSIQ9hgQUWcqS21Jh9PLouF8vk2SPIdSeYa00WcCzjwkMpBG9Rc5ZpdKfpMH2XnP4Gv6HRDp/4+y2gr7vq8ITQ+o0cDgJXr9mnkewcMbnbsSC8gUKlnkNB47+1+W57UgnWiHEq3VE+RW2piKrLlGvGeDmzr7lW+A7/Gt/ Z/neCEcP qeWJkBVux3Knxgm47WQXJGudLCjUpIoD/wM4PeroNs/7eT/cfamDdr4oQIheGkyoFQxpMv+htp4yIARcBY4W/pzMtLg9ZgFLWYvylR4H5jXDGUGzWIq9WUic1IswqpzLsC9rpw9XjYuF4mKai8jAgNGBys93FLjjuN+xxGQ9Tgx7vDzso17NOOfFNsv2VQtj9BwyMaqB3HyyC3sj97Bem+n6Pk9rxJUVt8xMyhTP5NjjyQDI= 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: - 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(-)