From patchwork Wed Oct 18 14:07:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 13427132 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 26A7ACDB47E for ; Wed, 18 Oct 2023 14:09:33 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E65996B01AB; Wed, 18 Oct 2023 10:09:28 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id DF31280018; Wed, 18 Oct 2023 10:09:28 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BF2336B0203; Wed, 18 Oct 2023 10:09:28 -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 9491F80017 for ; Wed, 18 Oct 2023 10:09:28 -0400 (EDT) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 55E7BA01C4 for ; Wed, 18 Oct 2023 14:09:28 +0000 (UTC) X-FDA: 81358764816.04.F94438A Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by imf17.hostedemail.com (Postfix) with ESMTP id C75FB4001C for ; Wed, 18 Oct 2023 14:09:25 +0000 (UTC) Authentication-Results: imf17.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf17.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.189 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=1697638166; 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=Ew90GRduGLuwlGQ2gfJPl9ppfNJrebvIabpuV6V4jCE=; b=bhB8qvhveOGgWQVfdmKM2zWzaz3yV2c8G3wVnxpwyL+ngnpHu+RQYturIvM/NF/tRehXdP 72z7r21/GEQH+La0voOc8k1nUblYbAMpNRXOnKSUHlqyZpJXo70o1qIMI4ZHlbHGGfPB9Q qeMjjTlXxng40WEInPTZNuDmGnjYils= ARC-Authentication-Results: i=1; imf17.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf17.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.189 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1697638166; a=rsa-sha256; cv=none; b=VFg2d4XErH1ab6tOWMmyuZ+4AQn0pdHCj790/S3wU3vTz7fxOAkMif8PuMZZYgTYVM74He anoujHGT4OALxyJkmQA32EsGwhXpEj+i+2IR6CDG/Is22qXENIoJDKvAHc2r37kRjwrLsW 1fuKbngY6NMUeK9NKrvPft2SU3L2+Bk= Received: from dggpemm100001.china.huawei.com (unknown [172.30.72.54]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4S9Xfd2h8yzLp6H; Wed, 18 Oct 2023 22:04:57 +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; Wed, 18 Oct 2023 22:09:02 +0800 From: Kefeng Wang To: Andrew Morton CC: , , , , , Zi Yan , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Kefeng Wang Subject: [PATCH v3 06/19] mm: remove page_cpupid_last() Date: Wed, 18 Oct 2023 22:07:53 +0800 Message-ID: <20231018140806.2783514-7-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20231018140806.2783514-1-wangkefeng.wang@huawei.com> References: <20231018140806.2783514-1-wangkefeng.wang@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.112.125] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To dggpemm100001.china.huawei.com (7.185.36.93) X-CFilter-Loop: Reflected X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: C75FB4001C X-Stat-Signature: 7paujftzw4qf1sn4i7odetf9foh3hgna X-HE-Tag: 1697638165-772209 X-HE-Meta: U2FsdGVkX1+S+rx5idA1YnjdVyZVge/feVqdUcZ2Gf4rgPaDHJMvfKlVThBMxLdsjHHpksTljVq2FRWJXkAJ71QI1rLgNzM64Q5hGEZ6k1MJkbdqDFC50dxWkxjW8VcY5b4IdFs9QjebhFrKP0v0nl8pnG6cpvFDqLit6lhXcFFAjAE7EAOQqxlqGKTen8hAH6AtXwoyV4T2RjshCkvpp2bIFKk9Z1btAMrpZwQAqX8I9h9QsZZeqEcur5Lukpf/yJ7ygOB5rPwHH982vDAIXV09XAd+MPFuZnhuzMDgJXz/ad/o1zJHoGswsiRbPLz/O7brD4MCGkUspFgznwnAvlpt3SpIBoXjDdzHqFCbkS4eIw99cC/jY6vQ3iel0gGOJaMOrUFAx+GRMyf8qa9IzCq2YVITMBylu7jivF2HA+e6ETtHpIndMezEm4U8GJzpfm0Hbpa7ASH2/skrAWIzyEhkDw6t3Ub5yyW3zRjclAhSFdQLe3JELDC6GbEJfzTW9tIlARc2r04dNBjdJoKexbQA9EhbWu5XwnQB+2LOYCEvYsCAJi1QiyZbJcYimHGEx/88GMjejLNdNjnpoEu975c7/3IgVo9OUsKdRWSILcMKF9fFRzpJES8ntR1n95DnJeOdv4rjMOLl8LQUenrIAYa/cBFyUMTqUmI/EwXCYzezfz8sSja7+aHdlMydAZk2q5WwzFhHjOiuaATUij4vP/Yp4RP9Ua0g6Uuy4V8lC1oznHhRA1E7yKba8dYZH7+wJi8nR/awQgzgZ/2978yux4QwVUoVirmyATDAF3a56GoItc/dpgrp+MvzoEDoo2riFjwjdtQRRuHeIBiG5RGBsNG96HMbstAibPfVElZJeSp6jJCri/TiDejEyd87gmXRPrVQ3gubQfP8mJrL7NRyT9Mah3g4w8JFD+4KphrGonaNTUd5lBJ9sSaSkcVCkOl6Zp3cgGwiQqI88UVtrwa 4fVvBeRD 8faixJOJkZlT+Ol2gmS0pu00fBBViT9bwVhQeJRRdN/J22sQiJXCp60ZklbpbRRX7khaA79hWH39fZj+Gyp4UhAwr7xYkmIlymKu29k1u/TYo+LSJFW9EXRii9IlwnB3xOmSTuYlQAfyICEPSCUeXEvfc6suxfR1Z/G/iIB4DCEFZcflvjmZE3BZMuVcxpSPg6clV 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: Since all calls use folio_last_cpupid(), remove page_cpupid_last(). Signed-off-by: Kefeng Wang --- include/linux/mm.h | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/include/linux/mm.h b/include/linux/mm.h index 1c393a72037b..1d56a818b212 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -1700,18 +1700,18 @@ static inline int page_cpupid_xchg_last(struct page *page, int cpupid) return xchg(&page->_last_cpupid, cpupid & LAST_CPUPID_MASK); } -static inline int page_cpupid_last(struct page *page) +static inline int folio_last_cpupid(struct folio *folio) { - return page->_last_cpupid; + return folio->_last_cpupid; } static inline void page_cpupid_reset_last(struct page *page) { page->_last_cpupid = -1 & LAST_CPUPID_MASK; } #else -static inline int page_cpupid_last(struct page *page) +static inline int folio_last_cpupid(struct folio *folio) { - return (page->flags >> LAST_CPUPID_PGSHIFT) & LAST_CPUPID_MASK; + return (folio->flags >> LAST_CPUPID_PGSHIFT) & LAST_CPUPID_MASK; } extern int page_cpupid_xchg_last(struct page *page, int cpupid); @@ -1750,9 +1750,9 @@ static inline int xchg_page_access_time(struct page *page, int time) return 0; } -static inline int page_cpupid_last(struct page *page) +static inline int folio_last_cpupid(struct folio *folio) { - return page_to_nid(page); /* XXX */ + return folio_nid(folio); /* XXX */ } static inline int cpupid_to_nid(int cpupid) @@ -1794,11 +1794,6 @@ static inline void vma_set_access_pid_bit(struct vm_area_struct *vma) } #endif /* CONFIG_NUMA_BALANCING */ -static inline int folio_last_cpupid(struct folio *folio) -{ - return page_cpupid_last(&folio->page); -} - #if defined(CONFIG_KASAN_SW_TAGS) || defined(CONFIG_KASAN_HW_TAGS) /*