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: 152418 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp1751818vqb; Fri, 13 Oct 2023 01:59:30 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFLXjh5L06JEbO4FFPeq7VYVL0+mYIGSZ9DIQblzpiqOAfLWx6xvjPyC3vZqpAqPD+gzzg+ X-Received: by 2002:a05:6a21:a5a0:b0:15d:a247:d20c with SMTP id gd32-20020a056a21a5a000b0015da247d20cmr34349295pzc.6.1697187570253; Fri, 13 Oct 2023 01:59:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697187570; cv=none; d=google.com; s=arc-20160816; b=PVI89BQ2ZrxAOawEKjwKAJ8l7i7hijwA1gbeOv2j9leipYIxJczB/rGClrpr5qP3ZD tpFl/w2L1hcxf7o9b2tAY3k25IpZl3dTS2qgzc+LeCApT1SRN8heVeynGftNzlEcMRd9 082hNIvwIHOZS6bQ5C2JE7WHV/JrzwKnsgIFv8yx+75MLvipGPApT+VkSi15YofRiDW3 Ux11afZUz3pNlj6ShHF+TZZOLL2AONEaCXcTrJR9n7bjwTr+TNl8WoiRTYz3E3u+yA2m nMc/1eE8I2mIAiA4yQwBRv+En0VW1kZfJ9E0K5RRT/GcfA+9mS1WcY/x9LsThyClLian b4Yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=dav5PI7iEms8jeP4a1XhSbNqrplMPXmJIKIe/iyLzYk=; fh=Q+Hibf2y+6rOlBpt37Lm5i0wTMmcQsnxMBqJTtvbZCs=; b=j0k1xipVHClnIc1CWoeOLOVnxDwf8qdIgTBBB/9LlIg1vRWoOCakqY4K+j2Ud2Ndi7 up3KyYndJ1SVkFBHgr32F7bzRcXZL2OavNOrrJbSwbLJkHQRLhu4ZK1+HwaFWrPCbyZL +8OsX2zHXZIwyd02SPhLeuByBRjmyHWR2t4ETY4OvlbEuCfYZY74OfrQyKmk+vIQC5Mx lvZM0rpiYx7qEQpZOx7VKLDzQQITfBiBTJ7oDDEukSbzlxLGyJvwL5ka0JCyKfz3iJCJ 1cjCUlbZqcq9FhvvfdAJKIDPoHppLrbsN/Vxl+O/ZLff8kLecQcP3+HpA3uUyuASRAMC wLig== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id z7-20020a170903018700b001bb8df95094si4329078plg.509.2023.10.13.01.59.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Oct 2023 01:59:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 9EB40839D9EF; Fri, 13 Oct 2023 01:59:25 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230223AbjJMI7L (ORCPT + 19 others); Fri, 13 Oct 2023 04:59:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230355AbjJMI6d (ORCPT ); Fri, 13 Oct 2023 04:58:33 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B54F6D7 for ; Fri, 13 Oct 2023 01:58:30 -0700 (PDT) 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-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Fri, 13 Oct 2023 01:59:25 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779630153734096186 X-GMAIL-MSGID: 1779630153734096186 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) /*