From patchwork Fri Oct 13 08:55:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 13420524 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 211E0CDB482 for ; Fri, 13 Oct 2023 08:58:44 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 347B38E0014; Fri, 13 Oct 2023 04:58:33 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2D24D8E0010; Fri, 13 Oct 2023 04:58:33 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EDECE8E0014; Fri, 13 Oct 2023 04:58:32 -0400 (EDT) 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 D29AE8E0010 for ; Fri, 13 Oct 2023 04:58:32 -0400 (EDT) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id A98C8401B1 for ; Fri, 13 Oct 2023 08:58:32 +0000 (UTC) X-FDA: 81339837264.21.BAA9EC6 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by imf20.hostedemail.com (Postfix) with ESMTP id CD8F11C000A for ; Fri, 13 Oct 2023 08:58:29 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf20.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=1697187511; 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=7QtDZV3rGljf6Na263q2RNKxLzMs0w9U59J6Zpvt4K9skdOM1+N5ReejfHpAoHBP5fMsZF jbOvvRpzVW9p7AcAVWy6Lja6STHUtZ8E864cD/EGu+JgTnb73Z+5ao2N95K1rQFcWwpo+O shUdkoGVOXTFi379YgHKTvMJZJwJw0o= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf20.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=1697187511; a=rsa-sha256; cv=none; b=InCrUyCFio4JxJSocPitrMbnS0Oe3qmUMW1OwRQvh4pnmAnyF9PIsaXKKrNNJ+jBPqghx9 90R8FEg/RJLkst8QwvfBQMM+lSCJyI/a8BQQtk3UXKtyR2CrF6/JjDHUMGXubnxDtkQhSq C9c5P7dDPK646H2LOMlr7GtCl2V5BcQ= Received: from dggpemm100001.china.huawei.com (unknown [172.30.72.56]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4S6L2D0JD9zrTQV; Fri, 13 Oct 2023 16:55:48 +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, 13 Oct 2023 16:58:24 +0800 From: Kefeng Wang To: Andrew Morton CC: , , , , , Zi Yan , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Kefeng Wang Subject: [PATCH -next v2 06/19] mm: remove page_cpupid_last() Date: Fri, 13 Oct 2023 16:55:50 +0800 Message-ID: <20231013085603.1227349-7-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20231013085603.1227349-1-wangkefeng.wang@huawei.com> References: <20231013085603.1227349-1-wangkefeng.wang@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.112.125] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggpemm100001.china.huawei.com (7.185.36.93) X-CFilter-Loop: Reflected X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: CD8F11C000A X-Stat-Signature: e6wndzt1dymogj8n1phtj6nk5ag177po X-HE-Tag: 1697187509-136811 X-HE-Meta: U2FsdGVkX1/yDhggNbKVJEOJvfIROiNqFbgeTuxSC4hLo54dkHAOf57VYuS7gT+r+Nh1KH1tmZGqj0mmmoDVMGbADwRFWnePReOggbA0mCEY6V81STDb8003TrmHVl6hSWIsAIMT2/zs5f1lfYH0jvNpI7r9ygmsO1ctet5w7ylvKqIvbRlAXRkpANAQhTrvTUUbr/pxk6dsWTBp/lWDj+XgLdO2QjaKC2OVSPAdILxedKrm16o88PEcv4rR1htnYDqmlDPULt2/2uS+FZdR/fcyoTF66/F0bs0519rfur3Xo3z0x1ewRbNVJGztjB8VBTjiH10PZZKfxlLegEhUSXPLThiK3liqqOFy+7WvvuQzJOUwUeHq2U+cFHVTWUlHRGGq9lNMZpTyh5TE5FCrYqAlqcnQra7uzcx+8exKjAvAiHKkwzDgbMBU3a7YJPx+uesm3wfk1YO7V249Yf0qyYDWNFedu3IwXMOmNKqo7SuFJHDN4qM3grXIm05Q2JuJBBRCOjnyMuEdDLBSMTt/hGUdmgsaxo6q9DKkil0V6NeqeZKNmMKlDeRF67huCBiLJMhS3rT6Cba0misAzGCcjOsNdqXJXuNcP0R2ae6bLeMxvYMCVWCKsdUrIis6IEyNYAPs4QetQj4q0Jv/m814Y4KH2Lw6fUNA19tkL0e1ZCs9rv03CPBS6BfCJAAdg9tCjPiB5NAuyOiMFPwZUc8ro3DkiCmSgeqm/NhinMcIsf/XkV3e37MrGCnmNN6ip9fT86HbBmS3pjYePoYmKXHO3O+iGRmQ2SjU3h4wfZSSkDd87Spac063kNY2wpYxGZvD1HwdP67EJMV/ijYkAbbXh1d/EdDJ1ufO4AKT+YzspnQ1LE8/im3UeuDcqZUDOU0G2rJmT1kRtnP5Rp4pBmO079DbFYZCVAOFXChtEPdGWRT+dNVMIrJsv2dV/7UKjzAvJe4YFQbT7OV2Tvvifzv vyhZiDKs gfotHRVF2clGUodi4VkqgrLTgcHNAk06UUhosdii60N6amJY3+DD386UFo7URACBU58wOG3TKeHqM+AzuK9uXvqRUjswrjPQL42X0sN1Fegl0GUbL5m+yngBM22zYeHgJ0SbWNzGRHUn0+/A7ZbC2WoQwly0KyP7WuSlbl8os9Qb8Io0wqgYRHsJo3jKECVaB7q8s0hD4I+nlFmCbcA+w22YKnsoUM5eWd9OD4b4zjyTVeu9q4DBLFN0RW32ySE6IGygYctHISW/LU0Qg4iaiRTUEWKLBJN4/am4C 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) /*