From patchwork Fri Oct 13 08:55:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 13420525 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 D3087CDB47E for ; Fri, 13 Oct 2023 08:58:46 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id BFA9E8E0015; Fri, 13 Oct 2023 04:58:34 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B853E8E0010; Fri, 13 Oct 2023 04:58:34 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 98B898E0015; Fri, 13 Oct 2023 04:58:34 -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 802298E0010 for ; Fri, 13 Oct 2023 04:58:34 -0400 (EDT) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 5CD6B1CA7D6 for ; Fri, 13 Oct 2023 08:58:34 +0000 (UTC) X-FDA: 81339837348.06.2317CD3 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by imf21.hostedemail.com (Postfix) with ESMTP id 2EFF11C0013 for ; Fri, 13 Oct 2023 08:58:31 +0000 (UTC) Authentication-Results: imf21.hostedemail.com; dkim=none; spf=pass (imf21.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=1697187512; 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=StlLhcIfKpsxdRrXhopoVSSE13ZOrOwfpAS1EMQoa1YDeYBYIRAXeTGYEuT3JPUqY67tMo diTaZagLgprulbnVq7Vx3bt0Pts7ztcaH4uskhrEOsPzlCYbjWKr/hEuMi+AZzpgcfMjfk DhYwNr0xKNTjVHE0pyW2tg8RI0txlo0= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1697187512; a=rsa-sha256; cv=none; b=uqIR7IwR2RCYCOsvzBHkH0pHlKFJmEFS/mOVjECZWvZwpo+R8HZ4VhnGJmXc8ipqaHVY62 G6r+3gYDeoCC/MY36z1D7x1lPpSneMZFcl1tK2GSaHbwTOLljhAwwIgcMMPhAqd1/SW4N2 g93Oy+xBsjNNzg6tEOTyfeAImpc6ntk= ARC-Authentication-Results: i=1; imf21.hostedemail.com; dkim=none; spf=pass (imf21.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.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4S6Kzx5jsFzvQ3m; Fri, 13 Oct 2023 16:53:49 +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:27 +0800 From: Kefeng Wang To: Andrew Morton CC: , , , , , Zi Yan , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Kefeng Wang Subject: [PATCH -next v2 11/19] mm: remove xchg_page_access_time() Date: Fri, 13 Oct 2023 16:55:55 +0800 Message-ID: <20231013085603.1227349-12-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-Stat-Signature: f98fjzmmtzksyxs1ispfeq9jzeem38wu X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 2EFF11C0013 X-Rspam-User: X-HE-Tag: 1697187511-125461 X-HE-Meta: U2FsdGVkX18NuaO7ECTgazFzEzRaThWV4iSdGNaOT8xVY+XplpfcyoUs1ShJFt7d2ec31mkxdDPxMaQaxYubXVcmvtqomYAEK7Zh8ZkU/iJABdix7MTZLMp/3wukWn3+DZ9yeSYg6ll/WsETHlOaeXUzgN2v5M79EGnqajDjN+aVX0oPRHxSa98IHy+XazcpSEH9g799Egk0NTGTSuZs5PI+39u2Ix/DkhAKWNGpH4omv+ygmR35Pa62wX4h+WlrI7DImJ260RgSgLGdjOf23oXp1MyU6ntME0x/A9d5XSVjO1p4sMw9oUTzJ72qKhoNz4Ae/vKBIVU2+6bP6Owd2MMjhkYAa9dntg1wCwMldptsVXeMpz1BoQ/3UASuvIovlMdnM2e313rTOZy0l6E72tKZ6NdrPnYUzdX8Nzs2FN++n+UAyVJRgJdHzGSnpcoMSkM9Hb3UYMZkPXlSHqLDDJYW2Vyc4PcqKLO0C+Upwla6zUglhBa9BfDPPiaXU/p85n4LLM+YNtjUOgVB+Pky+Pv/LtPYl9LUW/20+rXNrrDdA0KoYzB3+1p6Y4DIYW/j5Zfed8djdq7vYe700lvm38Dd4yShCykJ8BLdBLpHnWI+HG2jFwMJ6LPILsiQx0P2G8kPsh4scUbIuFAciX3KKsiAhLHz9quBdq2SpdBNv0HLeLPBmXW+oACWN8I2LBhIuuM1IJ2KZj1q4FcN2jj96/e88zGOqNTfLPBMnjrQ9aLGuUU+KoXgQh+Lc8SlRKIhyA5TwpiMjMNSltxUUPj6c0ks8psi6A7sJwPET1rs3Fu4HvjS+L0Od+WlOvOF6ZKGprvSqh3K+gRlllPOq0SK2BdG9VPonq56/gJIwE/70d7aFRBGEZ1ftIqf2X5YsqGHhFZD00K2k+e6U3u0pVm/9hVXaw8rVE9fHtgcz7pYQgftb+ME4waKRzmmQpfQ02BKOJjA+a7LO0b5JXTRm92 PzwzQywN DbAZifXKzKgL/ur+ClUkoOyvIIS8zl/8KVDlPavHFGb36s1nYdSJjdcNA+xGv0LRvRQEiVoNHbthxy9kgw6KJS3HwCH4CmTLnqL+tqA7aIdw2LWj3mjEiapEfxsML1mg9rK62SeKa4AKFebB9gpnJEq+W18t1eEgQsvpmo9gJUuFx2pSmNAmaDKIUIgcMVrVVS5iF1LqNfx/EKHxMb+PbDi2/0ztcdm3R+mMEDIVqrxndyry5DSuUg4SB0IA2qyhJI7JKhK1ZX6+Y7NSD2xX12IW14HGIlo3gEtQd 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) /*