From patchwork Wed Dec 28 11:34:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 13082859 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 30A3BC4332F for ; Wed, 28 Dec 2022 11:18:33 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 241A58E0002; Wed, 28 Dec 2022 06:18:32 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 1F1028E0001; Wed, 28 Dec 2022 06:18:32 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0E0998E0002; Wed, 28 Dec 2022 06:18:32 -0500 (EST) 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 EEBE08E0001 for ; Wed, 28 Dec 2022 06:18:31 -0500 (EST) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id BEF6F120B37 for ; Wed, 28 Dec 2022 11:18:31 +0000 (UTC) X-FDA: 80291466822.01.61B91FC Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by imf13.hostedemail.com (Postfix) with ESMTP id 2F4EB2000B for ; Wed, 28 Dec 2022 11:18:28 +0000 (UTC) Authentication-Results: imf13.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf13.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.188 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=1672226310; 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=9lNt2KKNOGheBwRBIftKCo6GZLaqqg9VD8IFC/mtDnw=; b=SCHxnuMrVrzRNHYe/odP1CLP2naAXIPrsfKzXxg1ec6MHWim57MQ/MiirqLGYYYUMJqjK2 IwM0tj60FYYA4X8BT0iEoFrlDKl8mXmxS+GFzUbxmsyTe3ZMvhyRET/nZpccPWTlaJlFvA yrG6P/wIADH1laz+Y6MyugANQfG9jAs= ARC-Authentication-Results: i=1; imf13.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf13.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1672226310; a=rsa-sha256; cv=none; b=U9kAY/MvgERSrQQw6Sxnymd+6RvtA5OQS3gcZSsO7P3QfCQgRmSjxFfmVsy1T4AYbIeVAS 0hjtQgzrxnlE0C0jSYewZIRHPCHzeqEI1Ma0Q1ZCqR3PpfRu5znDi6dJ5gPxVHY12iByd4 FrSJbW70BTirKDLtskeUay/GlIB9SLw= Received: from dggpemm500001.china.huawei.com (unknown [172.30.72.54]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4NhprZ0ZyxzRqJw; Wed, 28 Dec 2022 19:17:02 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by dggpemm500001.china.huawei.com (7.185.36.107) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Wed, 28 Dec 2022 19:18:23 +0800 From: Kefeng Wang To: Andrew Morton , SeongJae Park CC: , , , , , Kefeng Wang Subject: [PATCH -next v3 0/7] mm: convert page_idle/damon to use folios Date: Wed, 28 Dec 2022 19:34:06 +0800 Message-ID: <20221228113413.10329-1-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggpemm500001.china.huawei.com (7.185.36.107) X-CFilter-Loop: Reflected X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 2F4EB2000B X-Stat-Signature: zhawwwnk3iyyqjrcjqptsyn8m1h37dzr X-Rspam-User: X-HE-Tag: 1672226308-474137 X-HE-Meta: U2FsdGVkX188a9UXa5bVyYx7VhQd8yq4/nyZG6MBkfySAbKzsnsOvyLrzOlAxGDLm9Q5m4Kihpx0CEQyxE5ciwAtrDpFRxOfJmIx6KDI+FOzrfItwq26lp/aVKHa7wZdpeYms7qGQstWqetE4/aVBUFCVGE2Js+VdjrI+DwsXcwdzXEvfr3eypNuiXjVsAG7fiSnbiXz4NiDxMjtkz2J40Cqlaooupgv4dInt15YtbL2zklY5meXZ2LTeBDvvJ7Q5ypURAIFhoyW6vs6wytfvHrE+awr6L4yKdJ5W+KsYKPCvnT58lINqNpOET7GfZn2EKlLPHz2A8WYNSm/scmFyx3fY6MdYB+bZrue90qHKAshij7yyvzD6Zvfd8b+eOSi3JYOvMHcLYMfnqDmiwUujopCGhSqHu3+1u/G/PSzh8FfZN2EYk9Q/L5TZj8ZIHXS1xqVdFvTcMC0LzaZaSatilxmexa1SmW3PKKRCf1o6uATVAwI52VQpgdiGknc36yC7a0N2iIIleFTB0SJ5sFagbjjJOsPL/Nb6MApDNdHWkjcPBDIzxt1clrSHdmCwwRX9dbPAcWYOQizav25oW2D6r0c6lCQb0MQCN/QFWmesK1VUHJkk16ublZzsaGkGtTFeOg5YTUGHQ6bJVx7MrA7+acavCyvqqC0rNHyBgVacg7ieskPMnKP9kNeydq9B2NVb6XmjcXLJTDCwR29q0KpC235Zo2BKuOguKbzvAxy1JmUNQb07vsVgUI7Nouq2hQyUHYNpZOI647As3wxBGBPaX89H44jTz+ChnbgPBvxBDjcjbjkcLhfzF3SqmYF7TZavGuYFdyG4NGqxJA3Zv+Pq1OWLWc+Rpl3oN/ODbhqCjR+My70IGrd7SqAOcTQCn+I2A8GXWldZfN7694wEyCnJu3n5MOIHp5jvde3lYZN+jdKDAqXcqhGR3Snk3FKCRf8Cg/RM5YtrMqJV1jap1n 7qeMxr1/ tO9X5 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: v3: - more thoroughly converting in page_idle_get_folio() suggested by Matthew also do it in damon_get_folio(). - address some commets from SeongJae v2: - drop unsafe pfn_to_online_folio(), convert page_idle_get_page() and damon_get_page() to return a folio after grab a reference - convert damon hugetlb related functions - rebased on next-20221226. Kefeng Wang (7): mm: page_idle: Convert page idle to use folios mm/damon: introduce damon_get_folio() mm/damon: convert damon_ptep/pmdp_mkold() to use folios mm/damon: paddr: convert damon_pa_*() to use folios mm/damon: vaddr: convert damon_young_pmd_entry() to use folio mm/damon: remove unneed damon_get_page() mm/damon: vaddr: convert hugetlb related function to use folios mm/damon/ops-common.c | 38 +++++++++++++++------------- mm/damon/ops-common.h | 2 +- mm/damon/paddr.c | 58 +++++++++++++++++++------------------------ mm/damon/vaddr.c | 38 ++++++++++++++-------------- mm/page_idle.c | 47 ++++++++++++++++++----------------- 5 files changed, 91 insertions(+), 92 deletions(-) Reviewed-by: SeongJae Park