From patchwork Thu Aug 29 14:54:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 13783353 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 2AE95C83F2D for ; Thu, 29 Aug 2024 14:55:07 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A39296B0083; Thu, 29 Aug 2024 10:55:06 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9E94B6B0088; Thu, 29 Aug 2024 10:55:06 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8D7E46B0089; Thu, 29 Aug 2024 10:55:06 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 6DEB56B0083 for ; Thu, 29 Aug 2024 10:55:06 -0400 (EDT) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 11AEA4060B for ; Thu, 29 Aug 2024 14:55:06 +0000 (UTC) X-FDA: 82505580612.28.E2F53D5 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by imf19.hostedemail.com (Postfix) with ESMTP id EAC951A0014 for ; Thu, 29 Aug 2024 14:55:02 +0000 (UTC) Authentication-Results: imf19.hostedemail.com; dkim=none; spf=pass (imf19.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.189 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=1724943215; 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=JOR2MGX9PtUN1HlLALQ8TjuNyGJlNWhvftuXiJY2QdI=; b=a02peng4ASu0/tSzh30kpBeg+jBnROgvvdbGk4yDMYBi3gGTPEPRQNEEhiqr/H7G2UrToG yHi6YjLtk2LseSjlfAdb2oyhLGy2NWqwjC69mSszWMfZoHcMW+acr1wmL8X5Rx8ceQCwgq c2Ec1d6WlhafJ2Ba+FwrGUVz5Cf4jCE= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1724943215; a=rsa-sha256; cv=none; b=ALlm/LnvQzGKnodPGOAN2xZ1rGgrMMh1DRsa6kB3mnQToy0/p4OXlz/RKrUYCZbEHIv12q h/0URktFvHPuMKS9agEpJvjfVdyU6NOO9brxDcCZv7xvE9r6HNPzsYOazx185bV/HvVxaf pwqXAe4V6EllxclQafTGCnYngegcDmA= ARC-Authentication-Results: i=1; imf19.hostedemail.com; dkim=none; spf=pass (imf19.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.189 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com Received: from mail.maildlp.com (unknown [172.19.163.252]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4Wvkhv2nyqzQr6J; Thu, 29 Aug 2024 22:50:07 +0800 (CST) Received: from dggpemf100008.china.huawei.com (unknown [7.185.36.138]) by mail.maildlp.com (Postfix) with ESMTPS id 787FA180AE6; Thu, 29 Aug 2024 22:54:58 +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; Thu, 29 Aug 2024 22:54:57 +0800 From: Kefeng Wang To: Andrew Morton CC: David Hildenbrand , Matthew Wilcox , Baolin Wang , Zi Yan , Vishal Moola , , Kefeng Wang Subject: [PATCH v2 0/5] mm: convert to folio_isolate_movable() Date: Thu, 29 Aug 2024 22:54:51 +0800 Message-ID: <20240829145456.2591719-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: dggems705-chm.china.huawei.com (10.3.19.182) To dggpemf100008.china.huawei.com (7.185.36.138) X-Rspam-User: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: EAC951A0014 X-Stat-Signature: zt74obinom3fhmwqeh6iztmnow8btncy X-HE-Tag: 1724943302-646594 X-HE-Meta: U2FsdGVkX1/LPUatBkTVUxkxdTlp353HEzrgHC1CmC8wIkOyWAQkOu8iUCyCh8FpBz86T9MTWruFCCcYzj93p3V/jIo2W1UiYFTNvH+i0KZB0j5kAhIJF7y4O9euQBftb+cNq+As0gviqS6ua8g7N0rPsWabtqLV/m/RBir1Q8VADCva4YPQkW4xKyg0pUyBMFFlaivhMF3T7t28Xqi49aYYflB1RU7GsgTy9rp2eeBMAAaUJlGP11p/+VFcmEewyaOCAwYNVzvV7Ne3g6zTJmboQNMoVcPTob/ENH9wmiz7ml76n7sAJ7EzHEQ0ALAJ5s01C7puaXvaHUE3SGhvF09own7PUcer71Lg6TLAjRhnpxb2sqtCzgH5U/uMgVz4AeEacdQdfarg2TnbWh7Rqu3HvIhX3O59HPePgBmQW3FLy5e2AqZqWTFhmbu1XgAkpsxrIqVJth7ADgQCwEgvhTbuNVh39A7jXpZPczWhQJyFKbB7gs9ZLVee14eQeaLtaaxfjqQ9J0B+CHn/IgTG4sh1UwNnMuijGS4XjEa18SS7dQzfjk620ZsHvST5qhQ5yR1RBzarJLxyyrg9DAj7OjVfpm1GC93OR2vjfZEBAtow1TUUiKCqgsM98SRTuyHM01prfhvJi/6m0Y3WhY8NI/SoyOcsDYW1Uyx6Uv9G1lpckQy15q0N/VguQsiQhvW/88WcUAzMIU2um++uiPD5sHcadqWof2tC7ltzsaMy2TwSYEDwsasTROwegqu//eyzNRK8wKcLLJkChWi9TPPr88zbECEANUkRvhCYKlL0km+O5IRVh4xZG9EUUpNzIjSG5qtQpzHi5cNZOdB195nKA+DmtSekqv5cAJqFhAqavnTIPiqKZcb+jdh0fONvi5C227wSptlyGuwgDel+wbYJxNW+a5sBEdeUelIXnttQM66b8xtrfZVwd5qGlKz5lBKULZsVO5AG2PlEFMzy/zm UZI8lsdo Iq5TzDhRekuvDtbcERCjA/bfeGwRQTihummiKR3zqjpm82zXkl3avPYSS3RU+otOuvfsxYBqaRXrc2aX0dRPporbWHjDjZWwI3uk4C/KmPyzvpTHoebvmWMOK01FRJR0/ldbkpF67X2Bje8DMcgpDk6iTHjDf0JmyBkm+n6nGMwgGca8WIkC4Uz87AY3isyLdoefjPCPccS2oF/luyBTMrlyQzG29pH46tpXz9ctmgG1BtJQ= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Convert to the new folio_isolate_movable() to get rid of isolate_movable_page(). Based on next-20240829. v2: - get page reference before isolate_movable_page, per Baolin - since isolate_movable_page() callers with an elevated refcount of folio, directly use folio_get() and check folio reference in folio_isolate_movable(), per Vishal Kefeng Wang (5): mm: compaction: get reference before non LRU movable folio isolation mm: migrate: add folio_isolate_movable() mm: migrate: convert to folio_isolate_movable() mm: compaction: convert to folio_isolate_movable() mm: migrate: remove isolate_movable_page() include/linux/migrate.h | 5 +++-- mm/compaction.c | 38 ++++++++++++++++---------------- mm/migrate.c | 49 +++++++++++++++++++---------------------- 3 files changed, 45 insertions(+), 47 deletions(-) Reviewed-by: Vishal Moola (Oracle)