From patchwork Wed Oct 18 14:07:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 13427131 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 CE84ACDB47E for ; Wed, 18 Oct 2023 14:09:29 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A98FF6B01A8; Wed, 18 Oct 2023 10:09:28 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 98DE680018; 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 7D32480016; Wed, 18 Oct 2023 10:09:28 -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 68B376B01A8 for ; Wed, 18 Oct 2023 10:09:28 -0400 (EDT) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 3129A1A01ED for ; Wed, 18 Oct 2023 14:09:28 +0000 (UTC) X-FDA: 81358764816.05.2AFA02B Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by imf12.hostedemail.com (Postfix) with ESMTP id 7EF8F40025 for ; Wed, 18 Oct 2023 14:09:24 +0000 (UTC) Authentication-Results: imf12.hostedemail.com; dkim=none; spf=pass (imf12.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.188 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=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=dav5PI7iEms8jeP4a1XhSbNqrplMPXmJIKIe/iyLzYk=; b=V2KeGi7SaH2Fs2Cehu+v41CbKRHSsFFFu0C73RK2b/pR7/LMa51/W8FZss+Oj5/4dopZUF u7caH++xrqQpHyYQeZUzg02Rkf8hvGtTMpJ/x0GLAy7heHWzt+dhQZdcO8C319+vuB/twC g/tIXEdfjhJpmllOEvteVXPTW4Z6kfo= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1697638166; a=rsa-sha256; cv=none; b=Y5GzyEc2nl+1jE0LbUc09IrwbMIgMZjpFJ8nw/a+JWJ1S6g7krolgjLAZMoqDiN/YLTon1 XygZolbsI50hcE33KL+tvtgbhtKIhSBHvGuQvx7UkFJo/OC6G+y0qH4fn+2rOWQpMFtof+ ffq++/mBaawcnhw6hTQxPscspO71yBc= ARC-Authentication-Results: i=1; imf12.hostedemail.com; dkim=none; spf=pass (imf12.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.188 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 szxga02-in.huawei.com (SkyGuard) with ESMTP id 4S9Xg93f9RzRt5H; Wed, 18 Oct 2023 22:05:25 +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:05 +0800 From: Kefeng Wang To: Andrew Morton CC: , , , , , Zi Yan , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Kefeng Wang Subject: [PATCH v3 11/19] mm: remove xchg_page_access_time() Date: Wed, 18 Oct 2023 22:07:58 +0800 Message-ID: <20231018140806.2783514-12-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-Rspamd-Queue-Id: 7EF8F40025 X-Rspam-User: X-Stat-Signature: gxsa1oxk7k9mont9z5bhsjyji9z9ptqx X-Rspamd-Server: rspam03 X-HE-Tag: 1697638164-727529 X-HE-Meta: U2FsdGVkX1/BZTN/k1PH4QZpsbVx67Ia0YRBBjCieJcU9Bqml+1TZ3W6A/3n+8DhzYAfe8TaHDRhFdB2wBhCBLVep6Ms4Q4YZxyw/NypUxuPsQ8YuWRAr6F60y0UfajN7Wz0xkwAsbg9h6t3nEjm+kWM7+dhPV+7Q6mRoRvfRKNrcSC3GPj+wQUh/urmzMi+gWSzu2xMXOZWCPW66IYUpcykjv3pS9KM2l6DxfzdMD3hWavEslV1GrXNqEcslnorhjOzME6RuEWwTSQPMxyTRCW7Zfx/NBZ4/I3a/tXuL4i09+Sa+f3AtjI8ZNcQKkJblNg4NMjSH6ImTBuPl4MW5FkZO3x8iF2ZwR12n9GvSX1f7hHGHpzXijNFNu8Nv7MZGG6NYSv3oOKpyHzDf5x84KE+i3Zd4ybSBC34sSKzpR4s/lz9zWK8kFBU89m0yAeQPmw+bs6CZMUFWBEY+PCt7Ywuzb4gZ/KvVhw9M01dVvIPw1Elpokm4Am0hsctDlqOK5enfOu0X5FCWtK95T6l86CpecRsLW9anGF2OSkeKclM+Zpvd0iAQRQd75SKDmchbO4lUUY5OGBScBjMAExHzo2iUOBNbuLtbpOXIede9qNjp/VOXwWQ6kIXsynLjUEePeidOmgXoO5HGYNpuRyzTKsf/b3ohId+AQkwIrF1G48qKTiFu2yUqWqHT6tr+vMDVK4PmzCod4PcWSP/Shh25VrnVB/Ikka3KX+mL+U0M5HBkQBD6FZyqJ3Il36t26Q8jD4sPnuxN80jfFPBppvtUfEwOrQLFNvuz2nbHblD9Us/sh8KR717p8iFVUtGDx6eOpaj1mVOS2TJnyE+vpC2nOBZfbc+JR0gvZRHfPvoiwXEBgRIx7DBdWjNR56CrltUr5wumebVYfFWxXoRPNOMchg4E1lIA5fFiHZHHF0whgmOo4heqjEu+P4etpKryRM2+MEpndr2O9UJW9uzsEc fbYbZLwA cI3lzrEPcEp73A/h7Th6CKiYmmk2yxFf6u6SaoH24BC60/mkJzyFU86qmUUHiKiLzr35/9liKisnwD5Nl1TMHe7J0JEDqQr+jG6u0ydT9sJqzhJ3CEdBcZLtavk53ZSx+0lg06ELEOFRHBZfEHw3h4kCcwkQbsXAsNoZhqcl69UJ8BHZCeRtYns+jYnkmXRfr4dq9 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_xchg_access_time(), remove xchg_page_access_time(). Signed-off-by: Kefeng Wang --- include/linux/mm.h | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/include/linux/mm.h b/include/linux/mm.h index 1238ab784d8b..8a2ff345338b 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -1722,11 +1722,12 @@ static inline void page_cpupid_reset_last(struct page *page) } #endif /* LAST_CPUPID_NOT_IN_PAGE_FLAGS */ -static inline int xchg_page_access_time(struct page *page, int time) +static inline int folio_xchg_access_time(struct folio *folio, int time) { int last_time; - last_time = page_cpupid_xchg_last(page, time >> PAGE_ACCESS_TIME_BUCKETS); + last_time = page_cpupid_xchg_last(&folio->page, + time >> PAGE_ACCESS_TIME_BUCKETS); return last_time << PAGE_ACCESS_TIME_BUCKETS; } @@ -1745,7 +1746,7 @@ static inline int page_cpupid_xchg_last(struct page *page, int cpupid) return page_to_nid(page); /* XXX */ } -static inline int xchg_page_access_time(struct page *page, int time) +static inline int folio_xchg_access_time(struct folio *folio, int time) { return 0; } @@ -1794,11 +1795,6 @@ static inline void vma_set_access_pid_bit(struct vm_area_struct *vma) } #endif /* CONFIG_NUMA_BALANCING */ -static inline int folio_xchg_access_time(struct folio *folio, int time) -{ - return xchg_page_access_time(&folio->page, time); -} - #if defined(CONFIG_KASAN_SW_TAGS) || defined(CONFIG_KASAN_HW_TAGS) /*