From patchwork Fri Nov 10 03:33:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 13452064 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 8DE4AC4332F for ; Fri, 10 Nov 2023 03:34:27 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 04F574401C4; Thu, 9 Nov 2023 22:34:27 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id F41604401C0; Thu, 9 Nov 2023 22:34:26 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E305F4401C4; Thu, 9 Nov 2023 22:34:26 -0500 (EST) 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 D4E9F4401C0 for ; Thu, 9 Nov 2023 22:34:26 -0500 (EST) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id B99DE1A01FD for ; Fri, 10 Nov 2023 03:34:26 +0000 (UTC) X-FDA: 81440626932.01.26607FC Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by imf26.hostedemail.com (Postfix) with ESMTP id 802BF14000E for ; Fri, 10 Nov 2023 03:34:24 +0000 (UTC) Authentication-Results: imf26.hostedemail.com; dkim=none; spf=pass (imf26.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.255 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=1699587265; 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=xOb+y0XMkGGquyk/OT8zd4iZd7TUkuv++N8cKE08zJY=; b=ebcC6IZUHbNe8XQ+QhP6ggiSc7cD6GEsBvCZRhZyFY1SBZPEYVeG1IHb0f8aPrO0EsHf0q Ket9zrjf2bZPGzpC8qDuIsgQ9sVt0lRnovjOAZuKyYVghlYnYC3pw1lEocX4QsN4Xrn+2W rbZBAoMLhtgHD0dluc4oh9nnomQh7SA= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=none; spf=pass (imf26.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.255 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=1699587265; a=rsa-sha256; cv=none; b=iuSEUW0lC83iXcik53uUvSDVzCTSqR5enUoU7e91Mrj9CofSpuvYdjLMIDOHYHKjtqYPDg jJqiMrRMQjLwYstUF/3Hy4cH4VroyfShY4YX4YRiM/O/Fk/80WjVJu4Xk66J90artLL1YE AP3BSVKUTiRIiJw496fhDyB6oLfEG/c= Received: from dggpemm100001.china.huawei.com (unknown [172.30.72.55]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4SRPV373CDz1P8F1; Fri, 10 Nov 2023 11:30:35 +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, 10 Nov 2023 11:33:48 +0800 From: Kefeng Wang To: Andrew Morton CC: , , Matthew Wilcox , David Hildenbrand , Gregory Price , Kefeng Wang Subject: [PATCH v2 1/7] fs/proc/page: remove unneeded PageTail && PageSlab check Date: Fri, 10 Nov 2023 11:33:18 +0800 Message-ID: <20231110033324.2455523-2-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20231110033324.2455523-1-wangkefeng.wang@huawei.com> References: <20231110033324.2455523-1-wangkefeng.wang@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.112.125] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggpemm100001.china.huawei.com (7.185.36.93) X-CFilter-Loop: Reflected X-Rspamd-Queue-Id: 802BF14000E X-Rspam-User: X-Stat-Signature: 71m9xiqn1jtnsisicmp6o6ntmssh7gim X-Rspamd-Server: rspam01 X-HE-Tag: 1699587264-166918 X-HE-Meta: U2FsdGVkX19Y0oflmGIfvbn7gVP1ieUEdIdPt6DYbbahIiN2jSZYG/w+MDdoFb3o/Lqk2tgng69ElghnA4KJAYOuji61cQ1zYIXud4ynHILQ7CxORtS93WdkGiK/e6IdtFpuIEVmUFawWFyuwPV8nCw/NdoOIUrCsCT3dFZyh/yI9l7sDzkxXaVf+Wqwk0aXN7fECDufRqHfzUO/NaHlUkJFK7z5St6c2HuDI1CHUHFI1NZtxcvadVyEFrFtlzBg2otDMEUe8WMySH+WxfzLWxrx2ORsAYJ3fDypgqUv7YtGI+aLNSpHGBVHLQ9G/MySXhgh3Sw6xLYrBWaj4CkLgZASXeV8TlkcP8Fy8dzeSOwRqNTUEzd2Uqsj3z4s8AgWI8rKqGNKnWw2s7hHQ8xUlgFex4d2gzzeW8IIxQMHojHi3ctsOrQIosfFtLG3UsbFy/pbE49nS7xPAzsDEfDfnD4ON9+eRMjnKwipLEUgXtxvPxeJwN+V6y/stkd/Mo0ioIAmMKUGJxcjst88xPrnDjGEoQGkrkNHXNnOwLYHycg+SDGX+5cj/NPk2stZbFgYlnqJFvNhOayfoPQV7MeK+KJhbh6XV6gKnNTdZ3M6hV3d0ODw2HxHFHXY2amD5pOpQMdU2kVumlmifm/0yOGrUUwaXwMxofytZ8/BnPK3sgANysbB2/IdsrMiR1xwxOtMpmiQkMPhJlwqN5DwLyBdFcPg8P3sOWuuE6nNCFKhUTr0XBWExgdYWjNMk+99GX8TN7EN4rbkAXulmG15eVR0kvk5BXq2ZFMDHKcC1muRy9MmaYMVvU/ay1w/hW+RBmOYVkp6TKsyQ0mWesZtSDUweBLCGlVmwvVmAikvIwScQubwl4XhJpppjnuUrRMaTyIa1FEdBPppjVBT3AX4sNdnW0p3H44ocYK/kHrcubmZz5jPEErR+2d9oe+E/eTelJujvLizKJNIFMQNFtcBEcD p6mCdg9j /1ykd6SYDIAkBaZeEme0MmJeX4Owc1ii6XiBOhvHPjv+FRqwrfvyjYbzGWiEM9nD4LNK1NLvS7OuGimsN30Hx8tHl1epR6wuFqVWKEGrQ3u6uNdJtSo11nHO6boKh3HA3uFqCXAvL1feZEvc= 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: After commit dcb351cd095a ("page-flags: define behavior SL*B-related flags on compound pages"), the slab could not be a tail, remove unneeded PageTail && PageSlab check. Signed-off-by: Kefeng Wang --- fs/proc/page.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/fs/proc/page.c b/fs/proc/page.c index 195b077c0fac..466efb0dadf7 100644 --- a/fs/proc/page.c +++ b/fs/proc/page.c @@ -184,9 +184,6 @@ u64 stable_page_flags(struct page *page) u |= kpf_copy_bit(k, KPF_LOCKED, PG_locked); u |= kpf_copy_bit(k, KPF_SLAB, PG_slab); - if (PageTail(page) && PageSlab(page)) - u |= 1 << KPF_SLAB; - u |= kpf_copy_bit(k, KPF_ERROR, PG_error); u |= kpf_copy_bit(k, KPF_DIRTY, PG_dirty); u |= kpf_copy_bit(k, KPF_UPTODATE, PG_uptodate); From patchwork Fri Nov 10 03:33:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 13452063 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 CA2F6C4167B for ; Fri, 10 Nov 2023 03:34:13 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 928D44401C3; Thu, 9 Nov 2023 22:34:12 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 8D8E74401C0; Thu, 9 Nov 2023 22:34:12 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 778D84401C3; Thu, 9 Nov 2023 22:34:12 -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 680D24401C0 for ; Thu, 9 Nov 2023 22:34:12 -0500 (EST) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 3D3F1401FD for ; Fri, 10 Nov 2023 03:34:12 +0000 (UTC) X-FDA: 81440626344.04.D4726E6 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by imf15.hostedemail.com (Postfix) with ESMTP id 7D086A000B for ; Fri, 10 Nov 2023 03:34:09 +0000 (UTC) Authentication-Results: imf15.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf15.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=1699587250; 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=7m1Pxk98srFU0kXtPDQlyvtZ89qCO4y/HQx1e+D5jmw=; b=dIiWmQSQqVyEip9m/y0pnrAN1o85d5oj2278FkFIuHIUKzLZbQk+XOteoajUmnf76b46RG kozpd86nRbfWzUXKl6NHOjYXjelVor5o+LHS1NZIte7O3l1xw+ryd17yJFk2ZkXTkz+HCC N5NPhrglsm5MDVX1GZdAzDpBAhV6Urw= ARC-Authentication-Results: i=1; imf15.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf15.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=1699587250; a=rsa-sha256; cv=none; b=0ujhsXCt597LH3opkg+N3bVBUM3eeNG+i9dECKhpNoYSdSXbx/5rhAmoMkeceWlz1hxHyz VQfW23rzSQA1U0cRgnFbk1mFr2Y8TkQDoMXQNP6T9C94/HP4ek2eOlpu9Wh8EG9hpHjUSJ Axqr1lYlWFrnVAXITcFSVnDO31DyuoY= Received: from dggpemm100001.china.huawei.com (unknown [172.30.72.54]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4SRPV436p6z1P8F9; Fri, 10 Nov 2023 11:30:36 +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, 10 Nov 2023 11:33:48 +0800 From: Kefeng Wang To: Andrew Morton CC: , , Matthew Wilcox , David Hildenbrand , Gregory Price , Kefeng Wang Subject: [PATCH v2 2/7] fs/proc/page: use a folio in stable_page_flags() Date: Fri, 10 Nov 2023 11:33:19 +0800 Message-ID: <20231110033324.2455523-3-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20231110033324.2455523-1-wangkefeng.wang@huawei.com> References: <20231110033324.2455523-1-wangkefeng.wang@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.112.125] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggpemm100001.china.huawei.com (7.185.36.93) X-CFilter-Loop: Reflected X-Rspamd-Queue-Id: 7D086A000B X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: oqupdjd7c4a67n1gy3zwr8xcjsjmkd4h X-HE-Tag: 1699587249-837288 X-HE-Meta: U2FsdGVkX19JmunFBaPUlpgls4xbM0oZDiqQwaUEME5WGzUQtfMmeZnogg2W+UDbpIRh+YM1rIHgqrVDsFVH1XydCLRue2zpbG37QNbCP5pRo/y+G3jjy5TCDq3O1xPw19dSf4y42CaV2Ag/thSObdqnlIEYipcO7gywAof2kbhfjY0zS60pqeXc5pV9q/tgNjEVhyNMSTvzDg/WzXCMlBOZIefLslEP2tzUYbTFMqCId+2BG3wl+503n0aF5TkJmkdXHbJ5pd0zEMlATHwGxifs7DCH+2rC7vVopziSmr4+oVlZC6K3XSOz7nm0sjldp3PwrIf8V20dq7EuW0kb/M7Btgvn1rIioZ36RXG0BmIH6UtKsnxOKieqRuJQq0MCyf5tMMHc9mtU5qJS8FPja58LSYlrwOQjYYoHC4tvqrRdqmG7ymBcFv9u1B6ZKi4ldNtaCjrokEPtCQEuUD9ym38NN2+356/WzjUMupSfa1NJRynUABMQoYs5mFyZvc3Wq8rmEXhgWnYH9n4nYZ8nFRNu04St41aR9aI+wSunaYXF/Hlin1DCfKEMYepFvH7mk1MaF77vCIQCrcyEJDIwjC0XCP+UdYkqcQxZiE4FSMtzZ6UVzgURcp5No38PBaM0MhJ+e/HpQfElok209NZpgDQ1HbUXRg0yT6XVvokAiToqm7ocqI0z+96NeReu4YZgMNYwHl2+aXM6z0AcZaDRvoJ/NmPoP0Lj5mwR9jTgVVRdVxbiqmSOZurXf1dTxlsXgaYJ3Qb3YYhud5XW+OqdtkUUqRhAMCC3jzTn8dlAFCqV1BW+x0iqQxdjLWMYl95bexw3qeoPZ2KGhxX9f9+5z/2N9ack+RmfYWB1HG481BxGSJQSosim3GraSCUw75rp45F4mM/Vri58uH1m+cyrIyB209Kjk1PoZA1yrat8Bh4foo+UVYVRh1JsfsFd8aErtXvAEmrBJmHcbtZ4yhN ED3Y+Fyi BwXM3mzzKqgNSLyiWQlEDpMwa1Jvkj06QTraih7S1d9qMN50yW31rDpPkxwfD4uf8AHOOJ0LpEubJFxkw0RAtF9/paMvxGMj9XmC5I7sQcVRm6oRyBscEHv+JxHhqLVho+sP4qCRjjKPo7stSbY9FRdKjJp30GKYYN/w9uTKeeSNh4hPEfys/BqXKq71bscN8BDcS 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 nine compound_head() calls with one page_folio(). Signed-off-by: Kefeng Wang --- fs/proc/page.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/fs/proc/page.c b/fs/proc/page.c index 466efb0dadf7..dcef02471f91 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,7 +178,7 @@ 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); @@ -194,7 +194,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 10 03:33:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 13452065 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 D6F37C4332F for ; Fri, 10 Nov 2023 03:34:42 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6DF644401C0; Thu, 9 Nov 2023 22:34:42 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 68EF24401BF; Thu, 9 Nov 2023 22:34:42 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 57E6C4401C0; Thu, 9 Nov 2023 22:34:42 -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 4A07F4401BF for ; Thu, 9 Nov 2023 22:34:42 -0500 (EST) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 301BC40235 for ; Fri, 10 Nov 2023 03:34:42 +0000 (UTC) X-FDA: 81440627604.22.9828AD5 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by imf02.hostedemail.com (Postfix) with ESMTP id 19D8C8000B for ; Fri, 10 Nov 2023 03:34:38 +0000 (UTC) Authentication-Results: imf02.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf02.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=1699587280; 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=wl3f0dMey2iPkg5BQNRHLLycD41VYwvBbiVoQfJeshQ=; b=AJKunIELf9oS+p2mr/ksHCh7vZh2duMgLaP67ODikB1AK1g+F6Qct0dXKNmVhkwdMloxNB mt6R4FEacS53/vWdgRxr/xg9e6b5xBgg42EjVVf8OcRT3tYe6WN50eLqvg2c2Osz0js1Hq yLz7OpX8SqBOBMO8c756sZkzNMBKNDM= ARC-Authentication-Results: i=1; imf02.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf02.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=1699587280; a=rsa-sha256; cv=none; b=R5nwHNTYWAb2pS308CnfBxPOJ1YEMn7RiYUAAtgYQ+q6u+ofK0JM+UtZ+ns/o4wDC3qbBO WA/WMr6djyfwUW52l+Db4Z5J4S3byiKwlWYkroXn3Tq9190CL6qMa00u747wy9j0hBbqD4 z2V8gBx4Bk7qlv2rP4Is/eeeDEQm9fY= Received: from dggpemm100001.china.huawei.com (unknown [172.30.72.54]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4SRPV46W0Gz1P89B; Fri, 10 Nov 2023 11:30:36 +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, 10 Nov 2023 11:33:49 +0800 From: Kefeng Wang To: Andrew Morton CC: , , Matthew Wilcox , David Hildenbrand , Gregory Price , Kefeng Wang Subject: [PATCH v2 3/7] fs/proc/page: respect folio head-page flag placement Date: Fri, 10 Nov 2023 11:33:20 +0800 Message-ID: <20231110033324.2455523-4-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20231110033324.2455523-1-wangkefeng.wang@huawei.com> References: <20231110033324.2455523-1-wangkefeng.wang@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.112.125] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggpemm100001.china.huawei.com (7.185.36.93) X-CFilter-Loop: Reflected X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 19D8C8000B X-Stat-Signature: cjhm9m9i1kzfhhdzo8t81wcf5m9zu66z X-HE-Tag: 1699587278-454247 X-HE-Meta: U2FsdGVkX18SJ4asTffVPm0rlfvZfEYW6CowkB07msw+5pZtU7eVvP2cj7OZL34zhT/lIc4oxCQKotkuys5m9iBfHjeuH0GiMFP4OU7a/3mBrpyJ0BO4SuBAgb9IpNER3CDGN5le/8Pp+go+gw8jM8hu3K42IH1NdEx5MZ+aJ+bUJmns+9NuMYGmmOk5Q7pfeoCUDobG8zHTktybY5FzVQ9+M4Jlxisu15Y3H2hiciVuNenci/BD1wWtKRnEhXMlVWEK4iNrKHkad1Mh0VZ2/P9NLvNEj3MBfVAIaq4m/8U5X1GqEzgWKAQB9XRhEfZC5Bt74qXeWQpy1k+ELxrTUZ2cqgqsvAhqJ79l+BzpkvNcHuZdHD3yvWKcRQX37wC/vI9q6kTX4F4rfxpuO7dv89k5tqKTK01gU1wrTI680Cr+xgWfJ+0DSX5BtNUUHAGbUPODEnDQw1PC8e/O6TrqPSDpBKgaLHSIa7t20f0OIAddIloBEK/hz4o9L3nLgJf8tF7X+AykhFUYTvUZA+ldlArU+YevNrGfR3pE6z6AZmRbEPU5vzubftp5KyAM1+5jUSZOQSrNp83CLKVA5oKuiic49j/XGDXEliPKARLGAgb2LKXXsHCN6/pSuFk7ws///czJR1Kzi5OxODXlYSAjGr5JMN/tBWzcRAyCjUfAJvkqH0k4c6wekAhwEVyc63X10PIX3kLZLsFvfDIZG6I7JMfg1KrPmthiiuEH7hlo/ETLALVU4X14Ft4Hs/eWnTYsucJ2zvYXzXkFGuF/MFEp96Qfe1bRAqqNVoNyIgEH22OIJPqEp1yaVQixMqOLzIh5QKXxmgJhYN7dVFNIR57At3O/xyEIeiaQzSuay7PLe9pcSpn1S/YNbyxImNFkBMbjXrryH3aHO6bOmJzE35Pz8bnQl+Lnj4ij7dB38M4qgtR8miJ0jjn1+X2+ZpZflqNZbIh9Cvq/TASe9YQCVzU p55GPT2B VcypNyrteRK7zVj/jNqaIWUx15uLgNH3D2FF1+K+C1ETi43pkTCDolQQ/dRlQxs2x5qnkVtVr3lveUQAlIfYLiilBBBpM8CXo8eflfRX6OMmNy0CBY95IAUV3Y5npPzXWdYlR+2cVOeJZeUpywpIP+h1E+r8L5hbQ6M2Nr7cgyKENORGttgg4NC8HDLUDs5v0Mmymq8j0UVsSWpqqJXj+mlesZeEtvmomSRqlv4mzGJxk34oxgaXyBfSNSwOPdlC3D4in 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: kpageflags reads page-flags directly from the page, even when the respective flag is only updated on the headpage of a folio. Since most flags are stored in head flags, make k = folio->flags, and add new p = page->flags used for per-page flags. Originally-from: Gregory Price Suggested-by: Matthew Wilcox Signed-off-by: Kefeng Wang --- fs/proc/page.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/fs/proc/page.c b/fs/proc/page.c index dcef02471f91..553a7c921cb4 100644 --- a/fs/proc/page.c +++ b/fs/proc/page.c @@ -110,8 +110,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; + u64 k, p, u; /* * pseudo flag: KPF_NOPAGE @@ -121,7 +120,8 @@ u64 stable_page_flags(struct page *page) return 1 << KPF_NOPAGE; folio = page_folio(page); - k = page->flags; + k = folio->flags; + p = page->flags; u = 0; /* @@ -202,7 +202,7 @@ u64 stable_page_flags(struct page *page) u |= kpf_copy_bit(k, KPF_MLOCKED, PG_mlocked); #ifdef CONFIG_MEMORY_FAILURE - u |= kpf_copy_bit(k, KPF_HWPOISON, PG_hwpoison); + u |= kpf_copy_bit(p, KPF_HWPOISON, PG_hwpoison); #endif #ifdef CONFIG_ARCH_USES_PG_UNCACHED @@ -211,13 +211,13 @@ u64 stable_page_flags(struct page *page) u |= kpf_copy_bit(k, KPF_RESERVED, PG_reserved); u |= kpf_copy_bit(k, KPF_MAPPEDTODISK, PG_mappedtodisk); - u |= kpf_copy_bit(k, KPF_PRIVATE, PG_private); - u |= kpf_copy_bit(k, KPF_PRIVATE_2, PG_private_2); - u |= kpf_copy_bit(k, KPF_OWNER_PRIVATE, PG_owner_priv_1); + u |= kpf_copy_bit(p, KPF_PRIVATE, PG_private); + u |= kpf_copy_bit(p, KPF_PRIVATE_2, PG_private_2); + u |= kpf_copy_bit(p, KPF_OWNER_PRIVATE, PG_owner_priv_1); u |= kpf_copy_bit(k, KPF_ARCH, PG_arch_1); #ifdef CONFIG_ARCH_USES_PG_ARCH_X - u |= kpf_copy_bit(k, KPF_ARCH_2, PG_arch_2); - u |= kpf_copy_bit(k, KPF_ARCH_3, PG_arch_3); + u |= kpf_copy_bit(p, KPF_ARCH_2, PG_arch_2); + u |= kpf_copy_bit(p, KPF_ARCH_3, PG_arch_3); #endif return u; From patchwork Fri Nov 10 03:33:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 13452060 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 A50F9C4167D for ; Fri, 10 Nov 2023 03:34:00 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 84C724401BC; Thu, 9 Nov 2023 22:33:57 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 6B7894401C1; Thu, 9 Nov 2023 22:33:57 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 52FF14401BC; Thu, 9 Nov 2023 22:33:57 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 35B524401BF for ; Thu, 9 Nov 2023 22:33:57 -0500 (EST) Received: from smtpin18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 0B5011201F8 for ; Fri, 10 Nov 2023 03:33:57 +0000 (UTC) X-FDA: 81440625714.18.923FA28 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by imf25.hostedemail.com (Postfix) with ESMTP id 8676FA0010 for ; Fri, 10 Nov 2023 03:33:54 +0000 (UTC) Authentication-Results: imf25.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf25.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=1699587235; 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=4dxVUuHF6euSr2sshfFVKaKxOUe39k/DIgthsc5PjZY=; b=3/aqbQfy/a0CTCDxvsLLA9v2jRkQLB/pOwgusxOX7V7lIncypiy1EY37CGN2sBRn1T9jyH 7MJ9+N9srZnv6Vc/atUReD+VW8geeg10KPCvevwooSEq3itLp9cctoWPfun1aDVu7EQkkF aPI0N8RZi4C9SOtWRezu8X0Fp9vit0w= ARC-Authentication-Results: i=1; imf25.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf25.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=1699587235; a=rsa-sha256; cv=none; b=EmGinw7bwXBX9o+C+QfP4ws5FpMuweXG9LORck4e6J+IBL8iND1GtXitn28LMFssUir6Je wn1f40U/xzYi1Xb5Kv0Zu6Ru3GVB+XQVDKf/KsGrQu9ICGptD2/Pjlv5HiV3lbfS6toJwz 9ifdiM+jn1WIU76VmNVZRyHx9PKNU4Q= Received: from dggpemm100001.china.huawei.com (unknown [172.30.72.56]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4SRPYb14PNzfb7T; Fri, 10 Nov 2023 11:33:39 +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, 10 Nov 2023 11:33:49 +0800 From: Kefeng Wang To: Andrew Morton CC: , , Matthew Wilcox , David Hildenbrand , Gregory Price , Kefeng Wang Subject: [PATCH v2 4/7] mm: huge_memory: use more folio api in __split_huge_page_tail() Date: Fri, 10 Nov 2023 11:33:21 +0800 Message-ID: <20231110033324.2455523-5-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20231110033324.2455523-1-wangkefeng.wang@huawei.com> References: <20231110033324.2455523-1-wangkefeng.wang@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.112.125] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggpemm100001.china.huawei.com (7.185.36.93) X-CFilter-Loop: Reflected X-Rspamd-Queue-Id: 8676FA0010 X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: bh6q47pp3j9z6jnzta6c5x8xtgedixuc X-HE-Tag: 1699587234-520612 X-HE-Meta: U2FsdGVkX18EphgJE0DyoFg0CtQbAkvxxBRwaCX60fBYtNvUtTgv8n5CuCdbPRY1gxI7+c2HDR822jqupfIzojEyPLd0UDM21MZ/vNIthQSz9nuGLICSO4vlwKIAW8iU1npOPHdgKgWia/cZiqSn+HCOxUntFwS6iqn03lX6xIiWr9q2pJYONlm7KwyumCDyIzA0iM7WEdjDcGTdRiThOV/HX8UVZbg1u8F8wVO/84xBXHSWOz/wBZyXfTOCfPf6d0QegIJezdOnuRCjRZYkmHUBe8MsyynK7InxfuannMeLzvU/b3wVwKZGJhgBOQg68ZB8qhPqcBy42W5hXPLmwQ2Eti5O3Bk6RI+rQpLlXsGJvee4YxmbWcknEZszdMJ0baZzrpL7MMtoW8l10NQffo/x9nxYSRQvtSIz5p5QMspsDZigGTOa+qShvUQ37YualHFiYn+jzwCMOjnZf71I6K+zSJHQuqv4NQoF843fJMEH2ImGU/elur9+e0PCfMGKqUzgK30/2hdJdkiOtPX59gEaBHFMfCwS4TwzCZjYcbxAMZ6dMQstBtDYI60x8aYivox+b5WEN1VLloEyUrX1Ro6haq1VzQbwGCbnx+X7adCygPoj5MFfXZF89Q0h25KL6eRX7VrY705xFieAiyWORFPNjckR76QFCamN9L6KyaXWK/qLoxTg/JD25+ehs8xwhh/xXWrDnivSGQJ3NVCIXMh2AGwUkN4hvisxhE/S0gcDaSdVjFi3o7/8Ucm4EBow2F62jfs7G2OGYZ03OoAFjhIFhxaChWjTuiZAH+Y4H5E2/oJ/wnN9q8v3wuTdmND1651PQxjgMq2D606ZuGE9z4qkPP2hDC62FNLa43dW5bUptPc2U/MADBEx6S64vxLfzQ0s4m0Iu+VZgud+446e1OMJ7hbNpjrYp9ZIetMFAHI+VpOWNPzPC0pnhtyGcMxwL3Js7x7cwS39aPBMRh4 WYaGNrbi 33KjcYxVsNpKJu3ZOLpBv8WHS5uHVV4BMnWva0oWCCPytW/0ZgaMLhUvg3StcExyy6VY2FvPqR4SfYb8Oyc5+I1s7ub4It3MgLPE89IhNaNoBis25g5HTtO6SYjk5Oth/b27NK8rakTEg9J3KbcVoWHfJr8oxCyZE2J3Jd7Vga1u9P2riWr6/XID/S4sqfc9h91Xy 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 Reviewed-by: Matthew Wilcox (Oracle) --- 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 3f74a063f7d1..2b03c55ea425 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -2509,13 +2509,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 10 03:33:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 13452061 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 F0F5AC4332F for ; Fri, 10 Nov 2023 03:34:02 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D47FA4401C1; Thu, 9 Nov 2023 22:33:58 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id CD18B4401C0; Thu, 9 Nov 2023 22:33:58 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B980A4401C1; Thu, 9 Nov 2023 22:33:58 -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 A8E2F4401C0 for ; Thu, 9 Nov 2023 22:33:58 -0500 (EST) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 82E1312041B for ; Fri, 10 Nov 2023 03:33:58 +0000 (UTC) X-FDA: 81440625756.11.60A8A30 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by imf26.hostedemail.com (Postfix) with ESMTP id 4BA1B140002 for ; Fri, 10 Nov 2023 03:33:55 +0000 (UTC) Authentication-Results: imf26.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf26.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=1699587236; 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=EaJLPcZe74hOHKLXknVt3PsmvfGOnExzjig3UfkxqBs=; b=kVWoKds0KMQVl72MbYRaTeSwgLdLajJ1XC6JRVpnCIvgJrBl2k9EvPmXAw0UL1LjD8Ucph za/cyIx68gtS98Vw+xwwmSlPf5FB1lIeFfsPx0AiN1C8lLItOF1hwyv+9G54gn7ozJpjFS QhiWwtLd9YZQqFYS+abeWu2WHANZhm8= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf26.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=1699587236; a=rsa-sha256; cv=none; b=aHm3yb0VbSKyzee7qe2gGwPnUEEnW8kkjZJuDQ6CzOYL/3iT0gv9tZdyYwW48NeZIIdVw8 mjaz1qpnFCall0UlbLyeJ3IbTDVDHpGF7q4IXb3+HyZvdCXKt3hhdQZVuoGzDTGL6cLiyj RUMczGkJt9OlQcHAKquPo5PdMP6uumY= Received: from dggpemm100001.china.huawei.com (unknown [172.30.72.56]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4SRPV46ygbzmXKT; Fri, 10 Nov 2023 11:30:36 +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, 10 Nov 2023 11:33:50 +0800 From: Kefeng Wang To: Andrew Morton CC: , , Matthew Wilcox , David Hildenbrand , Gregory Price , Kefeng Wang Subject: [PATCH v2 5/7] mm: task_mmu: use a folio in smaps_account() Date: Fri, 10 Nov 2023 11:33:22 +0800 Message-ID: <20231110033324.2455523-6-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20231110033324.2455523-1-wangkefeng.wang@huawei.com> References: <20231110033324.2455523-1-wangkefeng.wang@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.112.125] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggpemm100001.china.huawei.com (7.185.36.93) X-CFilter-Loop: Reflected X-Rspam-User: X-Stat-Signature: 9kco34xi9m57u6h93rftchuepcxchxr8 X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 4BA1B140002 X-HE-Tag: 1699587235-812397 X-HE-Meta: U2FsdGVkX19z5WHcPQmz43Eyf3tnUUBECnp82k5f4/kfAW0Np13IrOw3Qd8XB3tfSIph153cMWsf0wnSGAZO0oL++Z00do1CD+nhUjD9RA2EsApa90ivaGMiJR7s4z06aR9y7uQmEOYGuvUAiV2/3vvYoLCSB2dduDb/UuWhIsH4/FHOe5/PbdHLzTeCZiUfTi8OeyUaLvw1qFyswhurnW+vQRejBOsPHP/qpCfQe1l5lP8j1QeL+lrUSRlHPeW+DfNzwG1iqJbqJCt+zDTn4mlhz9Hh9NBDAT+TyHQ1e1hn4n/kwSrDM733Z1bZlnZFzVbMrWwTzwt7ck9CUDNyie+fxnI85frVz1bHk/BZtK8Qu9Ft5T76aCXzjYaGrVfOgoCohFPQsSOV0bfI4vfY4vKrc/tmNhmawJ5dyg//ETcDEGQXoXNil10SFJW+QO6yUOg0zG82glloQpwYN9oHyKTjopKtZDmNNoZYzImNuhiPh5//bWuyfUqhHw/oiPBgOGTOrpJ2dMA/Ys/O7GRBw4u2awzbZkeiHVvN7rGWjfZKzVPtjvu24bK/V6XHqmbPHJJZqkWqNxxRbqGSKk3rTq7mikzn+i+N22H4QojhMN5rul3Tqgcp5bEoFaKopPniBTgxyoBUteShfB63nysDaGgcmIie3i7LxBuuA8pvbaZqPT4Th2Rer8Qk3X88HlGlTjthMcLVsqBWCmaxCng4ACIBjgZzt3QW9UZoPxGeQlzHn855MrPvkf29n39wtLbWvcPVybyw8+YRrbfDJA5ybzJtd/4yA/XVr5AwVqu8uq/nzWXQ0+miggyX9R1YVRo0zZGfg8ixdH/Z2YAZhkA+PeWV12OO3NbfJWYdZoZnbXXImvgU2kmJgO5+GfXLJXrQejvf/wjM/CqhMcC9/q0WkY+qAuVP7sqMnTWbewR7DPK8Okj9RiiRdVG+dyu4sRTFvNfpAZOJTyUmC3Y6c4y p/HR45ph X6B/WUADPrDYODOo7RiBKn8zGIVemubo6fNX72DqoT4+iQuoOqemqKppw5vsnk80gkBglDeDMK4h9PzwPFRWAW/LjRwR2AoXJ82+lg61kTit/75/6u4YIK2ivavd90v5H8E1fhZpMj+w9YSg17fu+gaQmPZZACGz5j3Qba1nKoeNTX/dBPH+i+0hKmH45rNJWPWTZ 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 51e0ec658457..fe15f99a4908 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 10 03:33:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 13452058 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 A53F9C4167D for ; Fri, 10 Nov 2023 03:33:57 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0005F4401BE; Thu, 9 Nov 2023 22:33:57 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id EF2BF4401BC; Thu, 9 Nov 2023 22:33:56 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DE1444401BE; Thu, 9 Nov 2023 22:33:56 -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 D02064401BC for ; Thu, 9 Nov 2023 22:33:56 -0500 (EST) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id A6AA8A03DD for ; Fri, 10 Nov 2023 03:33:56 +0000 (UTC) X-FDA: 81440625672.25.83AEF6F Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by imf08.hostedemail.com (Postfix) with ESMTP id 50892160009 for ; Fri, 10 Nov 2023 03:33:53 +0000 (UTC) Authentication-Results: imf08.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf08.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=1699587235; 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=yLmVQ9KLbgFtHt55SBzSQPM0B7D9zMqtHQVIyqdaEig=; b=K0DjXw0yYh+f6JHlfLsGiDI/pRT/I7NHfxueezTpX4GiZ+r2lEu2D7pDhUOKAcHg37NSr9 VKGHnKWWttYLoeDzEM4rjSCbWRooAJYF2Hzn521oA0BZdj7XCpqjQQiYEqtklgUDMwQxs0 nunUvnV33NZewnEoYE+pUkHGV6ul7fw= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf08.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=1699587235; a=rsa-sha256; cv=none; b=teMPKn0EoFUi5Kq6KOgDhsvJH2PkvW4K6+x+pFvPnRCt+V0uOC7CxP23brg0+UK2/E4XsW 5bfvYBK73YIcmGAaDwN96APmteZVrI2A7aY6SiqSy/JzD8rwaLCjyS7rttTk+bpMyBnsfu 1X7Qf2frbDekPvb/Hqi9roFQl595HtE= Received: from dggpemm100001.china.huawei.com (unknown [172.30.72.57]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4SRPYW5dvJzWhCv; Fri, 10 Nov 2023 11:33:35 +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, 10 Nov 2023 11:33:50 +0800 From: Kefeng Wang To: Andrew Morton CC: , , Matthew Wilcox , David Hildenbrand , Gregory Price , Kefeng Wang Subject: [PATCH v2 6/7] mm: task_mmu: use a folio in clear_refs_pte_range() Date: Fri, 10 Nov 2023 11:33:23 +0800 Message-ID: <20231110033324.2455523-7-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20231110033324.2455523-1-wangkefeng.wang@huawei.com> References: <20231110033324.2455523-1-wangkefeng.wang@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.112.125] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggpemm100001.china.huawei.com (7.185.36.93) X-CFilter-Loop: Reflected X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 50892160009 X-Stat-Signature: mkob6m7o3gibtd8f7hydyndx6emmmmbf X-Rspam-User: X-HE-Tag: 1699587233-437845 X-HE-Meta: U2FsdGVkX18Fj+wyLYBkvsMe16KxGM6/zMYAps2S7J9XPu5uN/STI1V6mMhAClWswp2ge7GPiDC6FT9Et0ft1knIlgxfhrX0s2ImyMcJNO3n3/Uv2RdkaFhtbpIv6sYNBSRqU618+UmYbY1R59T3YO+Vi1CZI2jcDcE3qRmNnH1LolvdcZ4OcxM6lL24ZC774PXUaAUDtWP9h3tuM9hRyXkNS4xvSQU6Z93rRu/IzjTQ3UWsfdsD8BRf5qBYKy5hPoFRqtr0Xs8e9EhVg2hlt3bG35Fd3tszldCy9ElE2RZUIjzgnt//+ppD7SstG+Ag7rcrUoK1600iYBiYGOvUgHmukuva4WE2lvvGUc6xoN1koSsgdfc7EAo7/keqySB2/MxrH16subVLUEF+Y305Iuzi/inZlesMRDivJfKlvSPdBN4KKo0Jde7K51YV5X2JauTNQKhYPLZ9QmnAVZOOUMxftzFnn50+OBZiHHLm78Dg13/7NbUUAFDNtlzvSWMG/UnYOXYpvW0ZIum5ge2fQmWtuuO9TZYp5Wg3OaNyYftkwhJolk9x+vkY43c2V0pg+U4snOIT8d81mzkQa5on2mMFKlQ/aLklY3Ra2QxEH7VgAGdtSuzXwUkh6HA12cpBm6PGa29o6/LQ3PNokyNxqu7o41Wsrp+ZYAUxTF5Tsbi3Sf9gA0kRyqMLfeLCeGCNvaDoa2KVwVU0gOLQmc+Oa5a/a/91D6FFShuQ+yE6QDVNWHhd8hA17Yld4BF2VISKiy94l0MkMvrtVI9eRwkkHY/q3xrkNjjjN++0GJGjw/ferT6cJf4gYFtR3h9ol2QZckso6fvPSuIT0GSeKeYJ7XK8ItXqoA9K8wcTd0cBn5aegY6Cp1tdqB62sWLgZ2VP9wNFQnUCCFZOvSbaIHjAmh3n9oW8B1Y9FzYfY0tSd/JBCXjQbalAhiSqK9zDu5QQ0KNfJiFwRV8E1xLxyuJ fJj1O4KH MhSJYFyuPN/ElV9W2527/hCatF5n/Qnargx+32874eiGJyReOF+qxp/qE9qpIHvLWo0wtkLVrkFWsc2mu5cNACivd9Wg5DYaezx4l8Kt8eHwLNBi4p2raUAnwRlsvamsKdhWxnvPTO68VQBoGEj/mFMlcXPMblRGvE6o0+Xzc+l0Lo619PXCpOa7TwD0GWugF8vHA 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 fe15f99a4908..740d5c4fa33c 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 10 03:33:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 13452059 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 CE7CCC04A95 for ; Fri, 10 Nov 2023 03:33:58 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 533A64401BF; Thu, 9 Nov 2023 22:33:57 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 4BACB4401C0; Thu, 9 Nov 2023 22:33:57 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3341C4401BC; Thu, 9 Nov 2023 22:33:57 -0500 (EST) 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 13E9A4401BF for ; Thu, 9 Nov 2023 22:33:57 -0500 (EST) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id DDCB2A03DD for ; Fri, 10 Nov 2023 03:33:56 +0000 (UTC) X-FDA: 81440625672.21.2F4C8F8 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by imf01.hostedemail.com (Postfix) with ESMTP id 7956440010 for ; Fri, 10 Nov 2023 03:33:54 +0000 (UTC) Authentication-Results: imf01.hostedemail.com; dkim=none; 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; 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=1699587235; 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=WG+Rc/9l/cy3SDJMi3ft4JfOrV0WjSK0voZH1AJ1bmO6JmgZQNI1Q/DRJNohz3KTve+JAV qk4vX6WpYyerjoqJqHClj1aMR66hZGkyhoehpIzihJltcfPvtAYpOt4oyJG7Uss5JW0cPN xcr9fYqBvXO2qmFMfTK+C34XDF9aCyA= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1699587235; a=rsa-sha256; cv=none; b=pmFvNkGUEn9CUSdE0qLocMxfjBa3dU3fEtCpbOntpFhLX2FcQe7OxMZwZaAcXLAWTULrdG og2YI/43NfuPC+vnsqePhPYHgvtFTYpFqKb/OXW3ka6pgc1XcQZUiHXDlbHKQDT4jFkS0D LBUIU50iA9ZCVRZYbeqG7ck70Dy1j2E= ARC-Authentication-Results: i=1; imf01.hostedemail.com; dkim=none; 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; dmarc=pass (policy=quarantine) header.from=huawei.com Received: from dggpemm100001.china.huawei.com (unknown [172.30.72.57]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4SRPV55pKYzmXKR; Fri, 10 Nov 2023 11:30:37 +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, 10 Nov 2023 11:33:50 +0800 From: Kefeng Wang To: Andrew Morton CC: , , Matthew Wilcox , David Hildenbrand , Gregory Price , Kefeng Wang Subject: [PATCH v2 7/7] page_idle: kill page idle and young wrapper Date: Fri, 10 Nov 2023 11:33:24 +0800 Message-ID: <20231110033324.2455523-8-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20231110033324.2455523-1-wangkefeng.wang@huawei.com> References: <20231110033324.2455523-1-wangkefeng.wang@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.112.125] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggpemm100001.china.huawei.com (7.185.36.93) X-CFilter-Loop: Reflected X-Rspamd-Queue-Id: 7956440010 X-Rspam-User: X-Rspamd-Server: rspam11 X-Stat-Signature: qriy5e5kaqejb4aphoio34amk89u8nny X-HE-Tag: 1699587234-768579 X-HE-Meta: U2FsdGVkX1+tB8+NquxcXBXgjM+6dZkQ3aIcBMSs1YTUpXQ+xRtnTc32mIP6B+9vtWVp2P0oFuzPj44XXxk6zwSBv8ocAgKPsT/tYccypvUmKb04El9qYlr1AZGUM69FjLFQ+QtNVII1jNCBoJT7Ep6YLYoIgu9mELlfpESvudoojxJCQPdolXmFHVbLduTiy783d6CxoykC6Th2DHx8kFe1aQsVZVyMZlKOxLGCgPw2k3aQAw3XKmp20ld2k+BxdL/nlfjzY5SCjS0NUrpHOzSf50fmaDChjKiCAsnQhKOlrQzxRXuTQrrL5pDM/qKDOfxBpe838qO2GysK7oyOamfFaS7wMa24G0swK0uPv5m34B3LqalyniDslsvEwfHXS21ZuCR8rtGsVjyzsTEZfCnFrchPKECvfmfTPNWKxpHGDawCBAcT+XRdQ3LI4BgRhRm6X5ByAOL19K0OhcX+zxKOn+A1qvkmZoP0UuI2zXQLijTtHjwjFWhEBHNqQ5Dtbb401ApKteMk2ZILMGYvNBFFhsvPSztj0orJBrFWw2MYlEwJWm3KcmYXmdHZgZL9MYoRJXMUuYY1/JQAiYwF8vD9R3nON0YsSp7rOPvAzsw7edOJebl3rlTSimJ8dewsmmuGczBp4OdKLvwRDmuS8PGh+hGN6TmSoSVspYqksGPi+azqTLiSQZe9rDR8D7bm3WH+l7zb56fC/782fHKNb+Nw+9oQXbc5d8HmSUpeuAT57tdPnaCvDp9oafq6wlwDdKlr3AYWAm/ULAVE5iWrNF0rt2PTSC3hetHFs/zbO43qacmDQLak8y5lQboJ3ikTUCKyAKXTYJ+G7KGn+/e+kdTrGKImdsnWBlDpDL8hHR0xkNaKi02y36mhRrtrkZNewkTyd5Gf+Ocq+62wvVOgUsHoEXrevv0OSU9vMny7AhrIHa7XAdelhQqQz1xb6iC6nvPHyU7RkurMlPG9HXs HTuqdRl0 0yWL2jWUyq0/0DvIxxJR91n0Hqkt3UqCKjl/mlKeXKbmDjgVIQskrotMrtf16nyLnFv0vHy/WKGgtEkYwh8066KZb8RozVNpnLdPn7Sfr+kmZ8xzJ9TnF24bbFxsttjbVamV2Hsf/eHkL4eKaEKXhoshu+I4+0Bl7nHMtO1U/Ci9KKjHAc/eqLLQkMkIsfhYI1z9G 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 */