From patchwork Fri Nov 3 07:29:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 13444389 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 1243AC41535 for ; Fri, 3 Nov 2023 07:29:21 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1D91A280013; Fri, 3 Nov 2023 03:29:18 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1B056280012; Fri, 3 Nov 2023 03:29:18 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EA98A280013; Fri, 3 Nov 2023 03:29:17 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id CF35C280012 for ; Fri, 3 Nov 2023 03:29:17 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id AD7B91CB2A3 for ; Fri, 3 Nov 2023 07:29:17 +0000 (UTC) X-FDA: 81415817154.19.0987E61 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by imf22.hostedemail.com (Postfix) with ESMTP id 7FB61C0015 for ; Fri, 3 Nov 2023 07:29:14 +0000 (UTC) Authentication-Results: imf22.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf22.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=1698996555; 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:in-reply-to:references:references; bh=65ZXimHJWlN/QEzmtlIfgy4P6IXnfEiyWMRz9ZITEK0=; b=ca+NaU8aVEWMToWwibusB+HHWFhmtKvydg4jzPEyq6ohAcPjLIndWnyJ+kd79vL8nc9TXE NRmHPLNR4UwGVpZ+NC0FLAR26qTE0FT2wuD9IMgSTT4crLwp7SBjGKSxf2zzTdJOA6BPcq tbnqtGigNCldYwZ2HksoFl4o8+Y2wZc= ARC-Authentication-Results: i=1; imf22.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf22.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=1698996555; a=rsa-sha256; cv=none; b=qL3BwRDsbbqj1zCv7znBXpYXs7zw/kGOgpHxSTtk1cMoIgFGAKUGuEq394JGfcgqREwi9U 4yunUexwgSCesOe1Qq2AAES57si0qRbT2kBmBhWgWbd/Q7Y+sEcpCnmrwtc90xWIXlwY2W EN4Yl72Io/yZt/NdEsq2xg2HhH8n0i8= Received: from dggpemm100001.china.huawei.com (unknown [172.30.72.56]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4SMC314Pj1z1P7ly; Fri, 3 Nov 2023 15:26:05 +0800 (CST) Received: from localhost.localdomain (10.175.112.125) by dggpemm100001.china.huawei.com (7.185.36.93) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Fri, 3 Nov 2023 15:29:08 +0800 From: Kefeng Wang To: Andrew Morton CC: , , , Matthew Wilcox , David Hildenbrand , Kefeng Wang Subject: [PATCH 1/5] mm: huge_memory: use more folio api in __split_huge_page_tail() Date: Fri, 3 Nov 2023 15:29:02 +0800 Message-ID: <20231103072906.2000381-2-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20231103072906.2000381-1-wangkefeng.wang@huawei.com> References: <20231103072906.2000381-1-wangkefeng.wang@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.112.125] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To dggpemm100001.china.huawei.com (7.185.36.93) X-CFilter-Loop: Reflected X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 7FB61C0015 X-Stat-Signature: psrfcfzkeh9pp634iceuop3c7owtq3c9 X-Rspam-User: X-HE-Tag: 1698996554-568720 X-HE-Meta: U2FsdGVkX196V/JJuV8WFrHF5FncGKD0hx0r99kpGBps07cQyeMR3IrCGx40ZTatJNiBrlsVbLVjovQUfzMzaYWfIxS7pvexMnzrjXupI54xBy+kA5oeQQOlxIjRk8fuSA674rvLyasf6x6QB/3me0PNa1843k7/Ja/z6iDgQTGZRFk4WxI6tzHxGG5rPLRYqemfbhLWohu9Z7ic74QRODP6S5q2WnUWWNB6glV8mINQgQieQmkDuyLTKgxw5A/+n69AXi9OkkbfH587MDtwB8+C4iuevF+1hJci+aGnD/TgjQyVI08MLQn9rUoNsOuGc0onZtVgH510k2utB7OL0hV8WWCRSZ6FV/bwXuf9CN3RgJYOvGjC8uy7lh26V+FIg2Ib9oW3m1uFX9CRiKOBeOGaT3VwsIgeiUCtqwD03relde09VmRr13PacfGcZs/lWIqOt0FqgtCjJxxLTox3IzrMAXmxJo5xix4LWKkShasL2ztfiOwSetS7w9SxKgPzr8T8PG9OUAZ1NeMJt+5LjsxaoqQClGZ98WyhlVteuxDrYvDnmhhxmFQrL0jkwK0Iapt3qQ6R5usNdZ8AVCFRYMNAl4W367wTkn6R4nB6mvNa8iuU6TJSeZpqyZuURJwm0+OYO+vyuJ2qeu/u6sQw8b6BG7XjnkPXJ+LxK7fiLDJz5oeI3xCyEue9ot0l9ZJjo1Fh2nvD1MGiNi+Hn3MqdJO0dnSMC6bW0ShPy7qfJs7hFz+sFadr/glvKOov5tpHcf5Sl2tlrw4QhMR0WFCeQJyfau681HfeRB1zY4tdiDAOlE5+HbSum7/oPBZ4IQMlIbLWZWkhwlpvTlv0NSox4OLcHiVj43QpVopbCY7CYctFeROU9Ib7JCnNa+Epq1AMym8M8k8jUO7uda8vNMWcu5JgzooWZeawxtRoGm3uOALNNrBrtUfGSM6FUEa5gXAgen7T4AzO9cO3Ia4u25e 3HUryVz8 YmMh3osUZVsyDRlch63rdMJR6QiRG8PdTPNOOT1lvIeTnCVW5Li9ift/Qk3N+XU7o0PN8lhLhRWULwQaWVz5Z3DeVsncrskLsj/ne3QIfx7NHKdcTgCuMTrnMWxRvlpnwJIJT4fZ6WBNI5j1DFKLLwDNPz/PaHH0m/ci8PaHVVzThBKqhsfoCShq2oT3Ibb0J6tIJ 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: Use more folio APIs to save six compound_head() calls in __split_huge_page_tail(). Signed-off-by: Kefeng Wang --- mm/huge_memory.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/mm/huge_memory.c b/mm/huge_memory.c index f31f02472396..34001ef9d029 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -2507,13 +2507,13 @@ static void __split_huge_page_tail(struct folio *folio, int tail, clear_compound_head(page_tail); /* Finally unfreeze refcount. Additional reference from page cache. */ - page_ref_unfreeze(page_tail, 1 + (!PageAnon(head) || - PageSwapCache(head))); + page_ref_unfreeze(page_tail, 1 + (!folio_test_anon(folio) || + folio_test_swapcache(folio))); - if (page_is_young(head)) - set_page_young(page_tail); - if (page_is_idle(head)) - set_page_idle(page_tail); + if (folio_test_young(folio)) + folio_set_young(new_folio); + if (folio_test_idle(folio)) + folio_set_idle(new_folio); folio_xchg_last_cpupid(new_folio, folio_last_cpupid(folio)); From patchwork Fri Nov 3 07:29:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 13444388 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 F24DBC4708E for ; Fri, 3 Nov 2023 07:29:22 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 42D75280011; Fri, 3 Nov 2023 03:29:18 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2E91C280014; Fri, 3 Nov 2023 03:29:18 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 160EE280011; Fri, 3 Nov 2023 03:29:18 -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 EB0A8280014 for ; Fri, 3 Nov 2023 03:29:17 -0400 (EDT) Received: from smtpin18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id BAA62C0354 for ; Fri, 3 Nov 2023 07:29:17 +0000 (UTC) X-FDA: 81415817154.18.CAE23CC Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by imf07.hostedemail.com (Postfix) with ESMTP id 677C840018 for ; Fri, 3 Nov 2023 07:29:15 +0000 (UTC) Authentication-Results: imf07.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf07.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=1698996555; 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:in-reply-to:references:references; bh=AQJiy9IXd2NR29+aOZjza5Dosuma1yW9JXDs2UHJAes=; b=BvbPh6i6KUFw7OqaaOG2n6T0JZgOuo2Oxc0s7H1IX2hiqrxcv4OIE+dRyVg+7+dw5XYlpA Omj7ObhN0bVcLQd3z4921sS6gr5SZJF3XRqO6CBkRMtoNr11UFdWGE/xkbLZIs6A+PxTAL BRUwmpcG7hs1GCX+UHW9rcS2zNh2nCU= ARC-Authentication-Results: i=1; imf07.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf07.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=1698996555; a=rsa-sha256; cv=none; b=XlqJJ7odd5XzXKxudIWlDI22YackUCdR4hasTv9bQkUcd/D5Ujc4H39oHhjFbbf5PmLX/m YjqAIY041RCN08BtZYDqiJQzRdDVcr5QSYvAGgGDN/oFZ1+u2J97dztkPZnN+wA/QPkoKY CvOZ9WdrOUkT2i6kEZ3Vu+Jxm0A5niA= Received: from dggpemm100001.china.huawei.com (unknown [172.30.72.56]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4SMC1p61SqzPnmj; Fri, 3 Nov 2023 15:25:02 +0800 (CST) Received: from localhost.localdomain (10.175.112.125) by dggpemm100001.china.huawei.com (7.185.36.93) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Fri, 3 Nov 2023 15:29:09 +0800 From: Kefeng Wang To: Andrew Morton CC: , , , Matthew Wilcox , David Hildenbrand , Kefeng Wang Subject: [PATCH 2/5] mm: task_mmu: use a folio in smaps_account() Date: Fri, 3 Nov 2023 15:29:03 +0800 Message-ID: <20231103072906.2000381-3-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20231103072906.2000381-1-wangkefeng.wang@huawei.com> References: <20231103072906.2000381-1-wangkefeng.wang@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.112.125] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To dggpemm100001.china.huawei.com (7.185.36.93) X-CFilter-Loop: Reflected X-Rspamd-Queue-Id: 677C840018 X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: 1jtjxrnub3s4uuwpstsh6uhtxf19rzwf X-HE-Tag: 1698996554-230162 X-HE-Meta: U2FsdGVkX1/RD9k/WFw0w8EhbgE6aXjAwfi+omq/CZA+YdafsXMk3GhBKuNi2PDMk3S0Pry1UDVTodwO+ZLlw5g90s7Nm2eBS8hQseBdok13ZL1LYL6U397PNTBk38dgSqW9JK9T9x0tbCU6EZvYfhmVhZ+N5PL0YXPHrtumlxPml//Bd5KjAp3DJRMZUyZTN3THGUu4vikUqF7jKNaEQCJgQjF6DjmSmlO/nQwyv2B0EpqlSbg06WMYF/wCdBm8zqPkwsQfBlVHwYT80KjeDSJKlfu9KUMpwxWrZGAPOF2k1Hfr4PppLyI6fEufXtXeUDsXOX5m0gPqqDaVFyPB6zy16LyZL+U4+aQA03D8hqPlg2DUCYdGaPgpJz3eIdmV6fVURfMWQKoBtIBV2MOWGHaX40FL+3L0qFSpofPSaOXyAi8Olzmy4eVVxeNh6AQ3dPipDHK2yQTf7rngANnfnMqmiLJkPHjahC7NjKw3Litznao699QEoLql9nQUyD//uMuh+dFYD6UY4sY6ZgY+EsxYLLk/xXci2ga9Y5E1CPMNd5S4yCgOJk0tPgprb+BSA9RiLb3rzMFWaGr3arTvl/E7aMGD5qWlF3GcVb0ln2e6bIRqimB+1hv7S0pzvYF2E4dH/DqVD1KHYj0Yb0om4vOKLoAhPbiCp/h6i/jzK2cl7ynTPtvhNIRYrWPB8P0+xEbloftUFmQmA6r5F33j96n62GZt9rAPOt4AxYXLcHnv4xrr8DJbqBws0dyPO8bOVPTq+yIMT6U5KMp0CXVS7Y1iX95DEW1uwFgAPJ8GYXEh3kWc+ZxUOKUAc+mJ3TtWwS1JN0Jk4Jhazn1HRorBd+t4WniG2YKOY/RVirhAoq8FyyODxWKT3N8QRYO1+iOSmo6j1T30HCaz11loDA2xcVypN1q2l+zSxB542voNERjqdke36B0/nk+iBbugAySyMvCnehPZLCwXqTfSeyD uCVoD3Ei e5q+jYpwrysX7WLeIbU8G0ms0D9wsBXghlHU+8MdJ/YoxCFQO9bXNSpzLJvs/uEe9b3Qf/SRcjSpoKAgCVOfOR/O+uGF8CE72zV+DuUOUHcLANSzFROe8ODmlsbHIA6KyM61zBlEk0/1HO5aGpGSNmqvOTuqOx12SPDSX9pY4n4JvX643SRORbvjEWqF3ECjSVgDe 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: Replace seven implicit calls to compound_head() with one page_folio(). Signed-off-by: Kefeng Wang --- fs/proc/task_mmu.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index ef2eb12906da..5ec06fee1f14 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c @@ -445,23 +445,25 @@ static void smaps_account(struct mem_size_stats *mss, struct page *page, { int i, nr = compound ? compound_nr(page) : 1; unsigned long size = nr * PAGE_SIZE; + struct folio *folio = page_folio(page); /* * First accumulate quantities that depend only on |size| and the type * of the compound page. */ - if (PageAnon(page)) { + if (folio_test_anon(folio)) { mss->anonymous += size; - if (!PageSwapBacked(page) && !dirty && !PageDirty(page)) + if (!folio_test_swapbacked(folio) && !dirty && + !folio_test_dirty(folio)) mss->lazyfree += size; } - if (PageKsm(page)) + if (folio_test_ksm(folio)) mss->ksm += size; mss->resident += size; /* Accumulate the size in pages that have been accessed. */ - if (young || page_is_young(page) || PageReferenced(page)) + if (young || folio_test_young(folio) || folio_test_referenced(folio)) mss->referenced += size; /* @@ -479,7 +481,7 @@ static void smaps_account(struct mem_size_stats *mss, struct page *page, * especially for migration entries. Treat regular migration entries * as mapcount == 1. */ - if ((page_count(page) == 1) || migration) { + if ((folio_ref_count(folio) == 1) || migration) { smaps_page_accumulate(mss, page, size, size << PSS_SHIFT, dirty, locked, true); return; From patchwork Fri Nov 3 07:29:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 13444387 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 E05F6C4167D for ; Fri, 3 Nov 2023 07:29:24 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3367C280014; Fri, 3 Nov 2023 03:29:19 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2E7E1280012; Fri, 3 Nov 2023 03:29:19 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1132A280014; Fri, 3 Nov 2023 03:29:19 -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 F1A45280012 for ; Fri, 3 Nov 2023 03:29:18 -0400 (EDT) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id CAA8514033B for ; Fri, 3 Nov 2023 07:29:18 +0000 (UTC) X-FDA: 81415817196.13.425EACB Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by imf04.hostedemail.com (Postfix) with ESMTP id 175E14000C for ; Fri, 3 Nov 2023 07:29:15 +0000 (UTC) Authentication-Results: imf04.hostedemail.com; dkim=none; spf=pass (imf04.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=1698996557; 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:in-reply-to:references:references; bh=8hChM+nSnnRVSf3gsBcEIPIrRk98k1bA3SQNacWoQLo=; b=ICMp9tfAOTH+BVyvRk6RDtyTpPe12HhoMOy8DWeOXeT+wNI3ypU3L1A5qdogeDUUQs8hD0 /l/ne0Z/8D31wkHrNk/coUXIe8MJQL9F5Wo9fRKv8edM0/2UeDq5mqMadw1xnyFtBMr8fu TiZM4GrQ+rq8REUMHfcmzfwLic2B2C0= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1698996557; a=rsa-sha256; cv=none; b=q7z7PYFuSy91C6oBPG+OEOP1nYq9EfMf35Osa+irV2+4Dm7lPB2uCNbQX6UZOKqLpcijHj Zmro0ERjOhtu3mI8GDUgr4XSxQkfcj2ZZLzOZtmfQ994xcIKLiOj61NO348vvAbMmtpwBy aR0pn8wQUY/wEGUWWtEtmy3EzT1oCyg= 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.189 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com Received: from dggpemm100001.china.huawei.com (unknown [172.30.72.57]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4SMC1W2j3lzMmLh; Fri, 3 Nov 2023 15:24:47 +0800 (CST) Received: from localhost.localdomain (10.175.112.125) by dggpemm100001.china.huawei.com (7.185.36.93) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Fri, 3 Nov 2023 15:29:09 +0800 From: Kefeng Wang To: Andrew Morton CC: , , , Matthew Wilcox , David Hildenbrand , Kefeng Wang Subject: [PATCH 3/5] mm: task_mmu: use a folio in clear_refs_pte_range() Date: Fri, 3 Nov 2023 15:29:04 +0800 Message-ID: <20231103072906.2000381-4-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20231103072906.2000381-1-wangkefeng.wang@huawei.com> References: <20231103072906.2000381-1-wangkefeng.wang@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.112.125] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To dggpemm100001.china.huawei.com (7.185.36.93) X-CFilter-Loop: Reflected X-Rspamd-Queue-Id: 175E14000C X-Rspam-User: X-Rspamd-Server: rspam11 X-Stat-Signature: pbrtkzcxwoifd3xzj5ka396g9w9c1zoo X-HE-Tag: 1698996555-412738 X-HE-Meta: U2FsdGVkX18nXZvjjGXpnfflGDCxJ9jgUHvhMpFLoN6rWCwFi1g05uYC2pWgkxFYXAoQXtTgF0cGOJQMH7Tfb6+AcTiaPjs0KGjXqnrMxvRZWu9YIQ4faiJ6NKgPSJ2o2vLCqHFF1u/THJ56VFFdvAqoVJpvYpD7Br0OY/cbaqrp7y5LdAyF4tUo6zbKSs75P3J4fSFwTmQ1astdDX+2y6uyin7GF3WCQTd0o/e9b2zmlcmNWFiWMnyQC3qZ+Av+PNGXpy7yrURieI3eJ1SaRzWu05E10Z1La0ZaSIN0aU65CCivK/RfCyEKplvYiDcsTe2+u8J9QfaeV8im2dCKk+0zA8aXwM1aQ7VI6s+9lPbhtrkXcmT8FKLomE2y929XTuUfj39blVsNrBoTg2BG1pCyY60nNRdHIaUfeIVvoHFmymaExKi7t5yjvmp5SPBC3XBJSA31gUSCfFxOeDlR5wP2btTABealRibPE2gLBPyzdJR13eqJ4O1ibVRWtvA6vBLsscXujMgfnHx+pmimXVteC4TA2PvfTkSC8pt1mZtpe2KQ0lIzrqXmd9VfokEb2zHxQZoVXwan9XMeB9uyH4mrb37M4ies5MUK6xf8WoDfuXbhxiQJrchzVd+bxT+CC2kDdYqM9a+E+62lOd7fmoY7YziyvLxeHTJVejFZj0WuZxiA0bYDasOVI11MCUW7f5447zT1p/i/ZN+gA8ce9RkbcWrLYt5jCCYF2QUIGIuEfykRuz0Daam7oVb+LcjlWpSgJpUixj24Z2/6Jt74yoi5AXsObug7IFj4er8eGLWKTalmNeCvPIZWgL23GUTXYYyUuKQSGtxcvOsnOJXiB6e9W1T8Gy8JJQMhlVSeij5AoXsWz+0u8brgnvoKNdQuxKu5oa28YhrtbY62VHHaqCLfmO6Ljjr6CN6u3oDzbAhrWOMHqVhMbdgCffj5NNUQWbu2C6cEIierR1IDYeZ ZpaWkeu7 rz0Jv3nAGRMxeKWEoegoRVdhX7IULpp9zUQJtM1SQuzU6pXMGu/euP7v38d2c/cdG78I0NA8t9MTMFqN3GApxxyxWyxizNPNlqbew3PpYUX2NP4Gt0iqobGNUBqF6sjZLCkn7kdTwA1IpWsnEoXl8EZLupASjymomU1boQVs2Q2w8ajBNyK2Oc2Vjn/ufto82RG7x 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: Use a folio to save two compound_head() calls in clear_refs_pte_range(). Signed-off-by: Kefeng Wang --- fs/proc/task_mmu.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index 5ec06fee1f14..869f6bb89230 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c @@ -1161,7 +1161,7 @@ static int clear_refs_pte_range(pmd_t *pmd, unsigned long addr, struct vm_area_struct *vma = walk->vma; pte_t *pte, ptent; spinlock_t *ptl; - struct page *page; + struct folio *folio; ptl = pmd_trans_huge_lock(pmd, vma); if (ptl) { @@ -1173,12 +1173,12 @@ static int clear_refs_pte_range(pmd_t *pmd, unsigned long addr, if (!pmd_present(*pmd)) goto out; - page = pmd_page(*pmd); + folio = page_folio(pmd_page(*pmd)); /* Clear accessed and referenced bits. */ pmdp_test_and_clear_young(vma, addr, pmd); - test_and_clear_page_young(page); - ClearPageReferenced(page); + folio_test_clear_young(folio); + folio_clear_referenced(folio); out: spin_unlock(ptl); return 0; @@ -1200,14 +1200,14 @@ static int clear_refs_pte_range(pmd_t *pmd, unsigned long addr, if (!pte_present(ptent)) continue; - page = vm_normal_page(vma, addr, ptent); - if (!page) + folio = vm_normal_folio(vma, addr, ptent); + if (!folio) continue; /* Clear accessed and referenced bits. */ ptep_test_and_clear_young(vma, addr, pte); - test_and_clear_page_young(page); - ClearPageReferenced(page); + folio_test_clear_young(folio); + folio_clear_referenced(folio); } pte_unmap_unlock(pte - 1, ptl); cond_resched(); From patchwork Fri Nov 3 07:29:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 13444390 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 D1F34C4167B for ; Fri, 3 Nov 2023 07:29:26 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A14B7280015; Fri, 3 Nov 2023 03:29:20 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9C5B1280012; Fri, 3 Nov 2023 03:29:20 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 865EE280015; Fri, 3 Nov 2023 03:29:20 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 6F8BB280012 for ; Fri, 3 Nov 2023 03:29:20 -0400 (EDT) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 430C4A0FDB for ; Fri, 3 Nov 2023 07:29:20 +0000 (UTC) X-FDA: 81415817280.10.141AD88 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by imf01.hostedemail.com (Postfix) with ESMTP id CFABE40007 for ; Fri, 3 Nov 2023 07:29:15 +0000 (UTC) Authentication-Results: imf01.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf01.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.187 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=1698996557; 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:in-reply-to:references:references; bh=ffFsOMCEMvqrtDLA9F7plpO34zh5hKKKwxR41j/1U6k=; b=WijOpl+qpY2epFGvnSgDYH8D8t8EAYFHpXObTLq43zkgsKIJWNYe+BqE8szARz0nWb+znt FnRs/gTw1J1LK1YApi44Q6GRo0BmEsaUybLweD2KgufBlI2yHrvGnndhm89B+/F3+Ym0TK kQkaNQZrsoZ5CT5sM+tWiwElYX7Q9Fo= ARC-Authentication-Results: i=1; imf01.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf01.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.187 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1698996557; a=rsa-sha256; cv=none; b=arclxNLcXrDbjSAQ5/F5nljDQrf96VPUqyZSMsoc9SqxZYqK0WIBNM9BznH/xSq679EGHz 6JGztRdZ3k62bGc/rEdQn0bbQfhY0i76SqwtjrLNw4iRegXMCTMHspJDSZg/MXYm937bGg 1icAUv6XeCDLndnNnHJ1bz/OZUP5tAk= Received: from dggpemm100001.china.huawei.com (unknown [172.30.72.56]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4SMC6W1mdSzvQJd; Fri, 3 Nov 2023 15:29:07 +0800 (CST) Received: from localhost.localdomain (10.175.112.125) by dggpemm100001.china.huawei.com (7.185.36.93) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Fri, 3 Nov 2023 15:29:10 +0800 From: Kefeng Wang To: Andrew Morton CC: , , , Matthew Wilcox , David Hildenbrand , Kefeng Wang Subject: [PATCH 4/5] fs/proc/page: use a folio in stable_page_flags() Date: Fri, 3 Nov 2023 15:29:05 +0800 Message-ID: <20231103072906.2000381-5-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20231103072906.2000381-1-wangkefeng.wang@huawei.com> References: <20231103072906.2000381-1-wangkefeng.wang@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.112.125] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To dggpemm100001.china.huawei.com (7.185.36.93) X-CFilter-Loop: Reflected X-Rspam-User: X-Stat-Signature: jk9w319bbjihjaxorisf6s6yyh676h16 X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: CFABE40007 X-HE-Tag: 1698996555-997400 X-HE-Meta: U2FsdGVkX1+vfFsoyj+6BjBW4AM3oYAeP7HZGXdsZ14KpUFuHsl1Z+0O9CGf5SxYFDz7mQrropStVjfSYGzrD4uk8Wf/HLaPDf4dK+zxtPDWAwvGMuBBIGrY0R4Pcc34VbFODr/pAj+iuNah5movBk0ngyhH63R7GP9z3ENqn5xrgJVwB7PryNqpWkUofVHumgxGTEbsPYt3gLI60PhOINwnksZb2DDjxa9fvP4C8psZUumvI4uJ+UDMPDUWybwkhWhNyK687idIhF85ZAcsgaV0bGSDBDnuHtdcqHzsYqjSjdxG4Ni68kza4teTlddS9YuVLNyNz23utWmcgT08zgh/bLPWNUcI8Ncuc3AcQu8RgvgQ8/5bWIZXQ6tV8PhhgJYNsxmWNAQ8y4g1/VELqDEqxJvrKvt+2J9KQ8rL3K7wdyG0ZFIdqz4V12Kqq7yvb3jPmL8SXWbHGFClohrX74y8ZdCyiDuATRp70yxcYVwPna6Nom5Te700U7UxGJatXAWUb2GuO8aucQeaYRo6ZK2DMlgF02pJxSvwiOq2Ion475UHeyCuohJmcpV1Y0227MYH36XBOXEQD1XLP595fGlXeBJGsg1B81Pya5VsnOgJGUICj0Rs5u8fsao/OmAUj8mVaA9Wn02njCd7Rn8Dv5dN9MYTAuYBhn9h459Gb1nJTuwp5QumNwuF8qOntM2o+EnFpcFlT3xEL6X0d+fKVK01NoGAmyiMAJUr9n5mzQT+AC3pAQ7/sRVbTK+o8j9O6KTJKnTMA+0BLXEFyv+0WPqgVpV26qeWM7JMN2CJP9WmKNY1590RpkjKl+IA32BkSzFMLfZVhg79JP91F7z5+z+/FeA/X9VessQayAgRmJRVMWFP54f4Hk+8PGIONenIOiKhyYFjpWAe4/VgYa/w0K4cn5v06SvWKFqk9L+cZd7rU2MFnGAm3TgwePFomejc6qGjsTUT60hSMvU83QB sY00qbqk LuOQfVVXp9BGXOyu1cONkpHse2aZiGhiDJAcc+qekwkHD6uWNhsscVcSckabnuWPtjPoIzATk+aHGUdliLC/N/M1tRwV2d1G2YU3ADw88mzeVg63j4kaqmRzHqAgoj/mPw/hJrkxRJZOpNpb8fBz59/O+nHN7rtp9jiOmDaJ0DANtjqqXROdYI5kZpxS/yUwnQal8 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: Replace ten compound_head() calls with one page_folio(). Signed-off-by: Kefeng Wang --- fs/proc/page.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/fs/proc/page.c b/fs/proc/page.c index 195b077c0fac..94ab0ba13b16 100644 --- a/fs/proc/page.c +++ b/fs/proc/page.c @@ -109,6 +109,7 @@ static inline u64 kpf_copy_bit(u64 kflags, int ubit, int kbit) u64 stable_page_flags(struct page *page) { + struct folio *folio; u64 k; u64 u; @@ -119,6 +120,7 @@ u64 stable_page_flags(struct page *page) if (!page) return 1 << KPF_NOPAGE; + folio = page_folio(page); k = page->flags; u = 0; @@ -128,11 +130,11 @@ u64 stable_page_flags(struct page *page) * Note that page->_mapcount is overloaded in SLAB, so the * simple test in page_mapped() is not enough. */ - if (!PageSlab(page) && page_mapped(page)) + if (!folio_test_slab(folio) && folio_mapped(folio)) u |= 1 << KPF_MMAP; - if (PageAnon(page)) + if (folio_test_anon(folio)) u |= 1 << KPF_ANON; - if (PageKsm(page)) + if (folio_test_ksm(folio)) u |= 1 << KPF_KSM; /* @@ -152,11 +154,9 @@ u64 stable_page_flags(struct page *page) * to make sure a given page is a thp, not a non-huge compound page. */ else if (PageTransCompound(page)) { - struct page *head = compound_head(page); - - if (PageLRU(head) || PageAnon(head)) + if (folio_test_lru(folio) || folio_test_anon(folio)) u |= 1 << KPF_THP; - else if (is_huge_zero_page(head)) { + else if (is_huge_zero_page(&folio->page)) { u |= 1 << KPF_ZERO_PAGE; u |= 1 << KPF_THP; } @@ -170,7 +170,7 @@ u64 stable_page_flags(struct page *page) */ if (PageBuddy(page)) u |= 1 << KPF_BUDDY; - else if (page_count(page) == 0 && is_free_buddy_page(page)) + else if (folio_ref_count(folio) == 0 && is_free_buddy_page(page)) u |= 1 << KPF_BUDDY; if (PageOffline(page)) @@ -178,13 +178,13 @@ u64 stable_page_flags(struct page *page) if (PageTable(page)) u |= 1 << KPF_PGTABLE; - if (page_is_idle(page)) + if (folio_test_idle(folio)) u |= 1 << KPF_IDLE; u |= kpf_copy_bit(k, KPF_LOCKED, PG_locked); u |= kpf_copy_bit(k, KPF_SLAB, PG_slab); - if (PageTail(page) && PageSlab(page)) + if (PageTail(page) && folio_test_slab(folio)) u |= 1 << KPF_SLAB; u |= kpf_copy_bit(k, KPF_ERROR, PG_error); @@ -197,7 +197,7 @@ u64 stable_page_flags(struct page *page) u |= kpf_copy_bit(k, KPF_ACTIVE, PG_active); u |= kpf_copy_bit(k, KPF_RECLAIM, PG_reclaim); - if (PageSwapCache(page)) + if (folio_test_swapcache(folio)) u |= 1 << KPF_SWAPCACHE; u |= kpf_copy_bit(k, KPF_SWAPBACKED, PG_swapbacked); From patchwork Fri Nov 3 07:29:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 13444385 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 F19BFC4167D for ; Fri, 3 Nov 2023 07:29:17 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7F233280010; Fri, 3 Nov 2023 03:29:17 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7A27D28000F; Fri, 3 Nov 2023 03:29:17 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 669C3280010; Fri, 3 Nov 2023 03:29:17 -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 5492E28000F for ; Fri, 3 Nov 2023 03:29:17 -0400 (EDT) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 2636512032B for ; Fri, 3 Nov 2023 07:29:17 +0000 (UTC) X-FDA: 81415817154.23.D1744BD Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by imf24.hostedemail.com (Postfix) with ESMTP id ACE7C18001E for ; Fri, 3 Nov 2023 07:29:13 +0000 (UTC) Authentication-Results: imf24.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf24.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.187 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=1698996555; 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:in-reply-to:references:references; bh=5eAPoCyw7ST93JlrloiSVZ/yrBLsJoeWkbzc0p5ovyE=; b=G8QUYIxYnFJrC911BI/I5g/VDBV4Wb8GkRqnyD+3URsiQFZu+63iyxqfYeNgvIS1HCT3np jWQI1dONjuCzbexcfpT7GgxWgkFGBWykejlyOw67UCg8CKuSFjpyD9NqsxY/5Lbh6Q3nN8 2Lx5rG513BX5gehyjdHT2v1ehpCtOsg= ARC-Authentication-Results: i=1; imf24.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf24.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.187 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1698996555; a=rsa-sha256; cv=none; b=pqgwqFkltE1f/mBJzCy+X72a+90lRy2lGGXHlbHhEUJSDSm045aitbCbPNUC3AQN19lmtT +j7e/F2b4YDbjBxsLh6pA2UrvEoJkAqkm4HSFvlAjNsyYxCF6MZtNerYp2UF8R5u2sCzsU +peTamJhflM1wbt2OEfTZSzQpFeD4C0= Received: from dggpemm100001.china.huawei.com (unknown [172.30.72.56]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4SMC6W4d5RzvPrQ; Fri, 3 Nov 2023 15:29:07 +0800 (CST) Received: from localhost.localdomain (10.175.112.125) by dggpemm100001.china.huawei.com (7.185.36.93) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Fri, 3 Nov 2023 15:29:10 +0800 From: Kefeng Wang To: Andrew Morton CC: , , , Matthew Wilcox , David Hildenbrand , Kefeng Wang Subject: [PATCH 5/5] page_idle: kill page idle and young wrapper Date: Fri, 3 Nov 2023 15:29:06 +0800 Message-ID: <20231103072906.2000381-6-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20231103072906.2000381-1-wangkefeng.wang@huawei.com> References: <20231103072906.2000381-1-wangkefeng.wang@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.112.125] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To dggpemm100001.china.huawei.com (7.185.36.93) X-CFilter-Loop: Reflected X-Rspamd-Queue-Id: ACE7C18001E X-Rspam-User: X-Rspamd-Server: rspam02 X-Stat-Signature: zgifx8mpk46knoaqojjzwajcn9t8g3gt X-HE-Tag: 1698996553-901063 X-HE-Meta: U2FsdGVkX1/OcAdxiAkkWZ4EqIil8Vk/V/CojgYlV8HaW3Utl4IFTNsPXoRnW8rXBp2Kn135xreiHOu7B8TQStNbkVOnVTRBDwiTtPuHXwwkBafWxBTDdQ3pAHLPzO3NCn9UMLHvfU51FULeeL/U1GEh8bYY8X9CAJ2VX97bGeXxo1HluJ8b7cz6ZZZC8JwFNy/H6Y0e4rAO3W3HHVpj/vYbymsVHrLQF1q+dxk+6R7fE51PulrUycdIfIb19OxmhnmNQPr9i8chE5KDfR4rFSn9fFSgdZOUOLn6vKG5z9wdZLDBH/ke3A63dCfKtt5uBYjh9x/cIjnEjEZjF+eVbyrmHfeDwtb4q5ZVqg3k9HPpk8t42jmTddQgDr6sO1U2e1M21lLiDCBTsZskcmGYsFpe6ameJ6rPVkXP23c8/+5RqXyztGQldEpP8SKpdmfLKSo4hG85xnwDIDGxo9OmubPNij3EEPfsxJmUF8kXiubAD3jl+mGeGfPf0rWZCRSkshtjtzxA5uBkNRs8KXKAbZyzBFpqUV83e3A6lchRD/aH8JByJhloGorpB+l1rcFhA6SXpYvdZmAkL9r1kfd/cmpOel465qSn9p3RwB2BBzRdND3APhAsLpUe2qLq1HsmAQyQamlmC3byCKiuikPM68+CtgsU1ml8L0XmRL4yXba25EniXkxmC/WWerhVW456ZLBWOf6ulrFDT0T9GOmaw9CRKxLBjjHD5VGFTx1GhLrc5wZZ9w2EHelRBEUhUriVBDUR96SsauKKwFOqFLYblpYnzR7I6V+BXBSPh/ATnf0A0jlZJLJXEWCgokedaD51cAkkdKI0KaPQMiGd6maxQFk6gY4eAvM/3DF8LfZJHelV1WtysN4Fz1TNVyIEnkckBoWBVyO/Or3UsgMiK185cqLHCeP7KzZ/YhPipfebhGu+z6orgjEo8Ya18v1fN8qT70yGH3Fmkma35nEzIVD Bj1ed/kK alpHsnnENP1c0aC10+tq5ow/DsgCMY9S+NaHhuT7I9JbILFERQQyY1ptJHWoRg404mRKC2OvGUfS/ccQ1Ysly05uzVaQyObSmHS9fEQDIpFJIzM25IhsN9BNuInTlP1H6EjxPTRCO+DIRoaYkdlrTf9qK4KoM0eY39ejUw7K9MF3NOaOoONQNzRGGF7FvSRe9kWbp 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: Since all the calls of page idle and young functions are gone, let's remove all the wrapper. Signed-off-by: Kefeng Wang --- include/linux/page_idle.h | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/include/linux/page_idle.h b/include/linux/page_idle.h index d8f344840643..1168d5f58ff2 100644 --- a/include/linux/page_idle.h +++ b/include/linux/page_idle.h @@ -119,29 +119,4 @@ static inline void folio_clear_idle(struct folio *folio) } #endif /* CONFIG_PAGE_IDLE_FLAG */ - -static inline bool page_is_young(struct page *page) -{ - return folio_test_young(page_folio(page)); -} - -static inline void set_page_young(struct page *page) -{ - folio_set_young(page_folio(page)); -} - -static inline bool test_and_clear_page_young(struct page *page) -{ - return folio_test_clear_young(page_folio(page)); -} - -static inline bool page_is_idle(struct page *page) -{ - return folio_test_idle(page_folio(page)); -} - -static inline void set_page_idle(struct page *page) -{ - folio_set_idle(page_folio(page)); -} #endif /* _LINUX_MM_PAGE_IDLE_H */