From patchwork Fri Dec 30 07:08:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 13084130 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 86D5BC4332F for ; Fri, 30 Dec 2022 06:53:09 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 129188E0002; Fri, 30 Dec 2022 01:53:09 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 0DA8E8E0001; Fri, 30 Dec 2022 01:53:09 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F31F98E0002; Fri, 30 Dec 2022 01:53:08 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id E5ED38E0001 for ; Fri, 30 Dec 2022 01:53:08 -0500 (EST) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id B181AA048A for ; Fri, 30 Dec 2022 06:53:08 +0000 (UTC) X-FDA: 80298055656.27.FCA1A7C Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by imf27.hostedemail.com (Postfix) with ESMTP id 34D4940006 for ; Fri, 30 Dec 2022 06:53:05 +0000 (UTC) Authentication-Results: imf27.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf27.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.255 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=1672383187; 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=7MpLJBMNygvLgnI4gNAolZl5Z6C5PTDTQVTfrb1n5qg=; b=Q0R+ZLU0ZxCURPvf9O5yII9EYi8wuaCO1MGieERc5FUD1XnRyhbXucoO9pStVgnDBF/saO MJ7O+jgk9WEjCUjmKjbKQdz73XKkDzS/xDoUcB1lZEDvfamf0Z5e+8OrO86gqYk9G1VCk4 Mv0O9u2vFvHiI+JQ9mnkbO/nbG+hxwg= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf27.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.255 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1672383187; a=rsa-sha256; cv=none; b=1rtTwVTsLICRqv9SNtjHpAcxUNejqFWXYxJPA5hFnffXTvkuOnfkWAR3tD4l2a3hvQ7swE Z0xhXvQ6nLr+Esl0fB992q95VgIHPj3gZ/UhLzvwA50p1pt5/D2suiCwNhLK4TJ9THICkx iEWpj5lCQDjqWrroESm0r1JLuWBztTQ= Received: from dggpemm500001.china.huawei.com (unknown [172.30.72.54]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4NjwsW5Mtxz16Lxp; Fri, 30 Dec 2022 14:51:43 +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; Fri, 30 Dec 2022 14:53:02 +0800 From: Kefeng Wang To: Andrew Morton , SeongJae Park CC: , , , , , Kefeng Wang Subject: [PATCH -next v4 0/8] mm: convert page_idle/damon to use folios Date: Fri, 30 Dec 2022 15:08:41 +0800 Message-ID: <20221230070849.63358-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: dggems701-chm.china.huawei.com (10.3.19.178) To dggpemm500001.china.huawei.com (7.185.36.107) X-CFilter-Loop: Reflected X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 34D4940006 X-Stat-Signature: rfxigpssiywkyhf1m6k8xdx638jdcrgf X-Rspam-User: X-HE-Tag: 1672383185-887681 X-HE-Meta: U2FsdGVkX18hdcnXlCLJopBVRi+QBzwK+E9J+XRGWhz6dpwGVQhkzRk0emea9FFVthmlcK4JcEOumL7cKl/JhV+mfavWYxlqo1Ca6NY+1vZEN876DQplQGrnYFxZRXoxEq4DPp/R1hXaeLGS91xNFmMped3XhAQv/hFaNvYvfBeJt8MAPkVEr6da/VITS0e6BKN5nEsYutz8QY1y49T3GzQ7a8IeXvc7xlJabtaKk3l2qnUuZD+cphCyIFOrX2hH4GLqWr20I2Cj61f50egHiWX3QM2IPkik2MWtco+VcyTUnBBA0Wf2cTLtU+NIuIGU+eM4JrrrrqMWIdC6m/I1Q1CAwIYbLRXOKuqPNiRAQuft5nNixKlCZzKVsNBbTu1FtO+cpSpCwUgJOxXMPJN8iU2cnQN9Zj4ijtPRbL8haBWxaKgL2h8uG2POGm2v0Pxl2tJgCdzaGHcjIv2saxXONOcYRQ2vJr7Sdvq5CIdSgB5lZRdDzcf5plWXgcYxINPrBABHvghVNetD76pwj88PzCwfg/7zEB2cjCOyO90RARsEsiMLShI+04Hkp38UMaOOQBQ3oMKChmxQg5LCMTdNehO1h2UQHLauAvLn4+1QGnv7VAmvACtX8UijZWH6DW0Rjh0TFssfvlQq9FRZk6qhBCVIwFrSBHTqrZB4OTX3gRCwlRewJqOXSLgb1p9I9mWuDho5f4sY+rFNp8gQIifvD6ogSLiZM664IloduFZD7G7NfYb7H9F+ZpbB/qesO+f92IhnnlC/YHAOcq3EJ/ZWB2G1hSQLSIZhs+x6CcakwH6sISA7148BpYb5WH+8nbI3ItC0ARCDa0BWGqHiCiAyyd0ZtLcvdq+G1exuhiHd7DsrMcRyCy+RhiR10HX2RTROxe2goPNbfxanj2fEeX55NaJw4Qzr8JYpNs1PNyUeG4uE80ytBvbboCVJ5hBKa3Q3Id+By2qGVB/XR7/2wHD rG77PLBJ cOfKi 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: v4: - correct some wrong spell pointed by SeongJae - add new folio_memcg_check() from Matthew and use it in patch0005 - add RBs 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 a folio mm/damon: introduce damon_get_folio() mm/damon: convert damon_ptep/pmdp_mkold() to use a folio mm/damon/paddr: convert damon_pa_*() to use a folio mm/damon/vaddr: convert damon_young_pmd_entry() to use a folio mm/damon: remove unneeded damon_get_page() mm/damon/vaddr: convert hugetlb related functions to use a folio Matthew Wilcox (1): mm: memcg: Add folio_memcg_check() include/linux/memcontrol.h | 40 +++++++++++++++++--------- mm/damon/ops-common.c | 38 ++++++++++++++----------- mm/damon/ops-common.h | 2 +- mm/damon/paddr.c | 58 +++++++++++++++++--------------------- mm/damon/vaddr.c | 38 ++++++++++++------------- mm/memcontrol.c | 6 ++-- mm/page_idle.c | 47 +++++++++++++++--------------- 7 files changed, 120 insertions(+), 109 deletions(-)