From patchwork Wed Oct 18 14:07:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 13427126 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 DE77BCDB482 for ; Wed, 18 Oct 2023 14:09:12 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 69C1D8D0016; Wed, 18 Oct 2023 10:09:12 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 64C9D6B01A7; Wed, 18 Oct 2023 10:09:12 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 513F08D0016; Wed, 18 Oct 2023 10:09:12 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 409606B01A6 for ; Wed, 18 Oct 2023 10:09:12 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 14333B5F3F for ; Wed, 18 Oct 2023 14:09:12 +0000 (UTC) X-FDA: 81358764144.19.B10D980 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by imf08.hostedemail.com (Postfix) with ESMTP id C68DC160035 for ; Wed, 18 Oct 2023 14:09:07 +0000 (UTC) Authentication-Results: imf08.hostedemail.com; dkim=none; spf=pass (imf08.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-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1697638149; a=rsa-sha256; cv=none; b=uATRx6nAJ8b+Yv6ZmGl8V+ZFkjW4eqmNU6J9bWntixR0pMIY13RBOBgqOR+8UGuxwpR2iv 0kPDqrekF/WKtmiPxnQ5FdZSkUIV/JF8MyxdFEJE8FVgPJJPGJoXd6AEsgRVdev6tOifgH M7x57I3IyiSJ4CbItup3cjpHfqQm9hk= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=none; spf=pass (imf08.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=1697638149; 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=MKSp5EBF6+Ov7gSZHW50N+nAf20gVCjFGTQvZhuqW6o=; b=fzIh1QJ22cZ8bPAivoJxT5pziyOeqimVGmU46sBkwWQ3oGCPk23hZAC4ctbU0oWCiZK2ze yQUDR+S0QnBdpnDX56pDZBj+5Jzz5Et+NLnR9ZQFc0twWOL9xe1vmTgjQmal4oy5AyVTGz eWB0viOK9S5/MgdKLBxgj7Uudu104Ck= Received: from dggpemm100001.china.huawei.com (unknown [172.30.72.55]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4S9Xdt5dLmzvQ8j; Wed, 18 Oct 2023 22:04:18 +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:03 +0800 From: Kefeng Wang To: Andrew Morton CC: , , , , , Zi Yan , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Kefeng Wang Subject: [PATCH v3 07/19] mm: add folio_xchg_access_time() Date: Wed, 18 Oct 2023 22:07:54 +0800 Message-ID: <20231018140806.2783514-8-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: rspam06 X-Rspamd-Queue-Id: C68DC160035 X-Stat-Signature: rixmr18ff3ekmkpy878mf931i1g5ijx9 X-HE-Tag: 1697638147-723251 X-HE-Meta: U2FsdGVkX19PPk/vuJzgIwGyz/NeYl2uur0l6Z58d40wX97gq30130wPHyJ4EBvcSnKpyMU8I/qGoaefOu5X1St1HFHhrmJfk7EVAb+M0qlBoaMpnhapALzAAoKBxm1ETpzaTI8Y492J9Xj4xdpiQDXb4IU642QCd++WlCyHcfC6OarPnGEhbCk0g+y7ZGCRwu7nsESLyapUV8s+xZTzybNG0CgoWEQuW0BupkDCAIGc+oc6CY/SynjHxsm5EQDge/KNWtVYNsMLDR0o0Wmf9nggvcMLKjIJIw57c6J6q9/QwV8cEyJNb3lP3569PiqhJpsugl5TTpsKWV2CUDfGutrFtxrbyBmUqTAPOzIlJDQXTzHYcHDthLZciBI82zp/hzihOh5jY6CcDAY/XHILFfOQbxHLEiYKTcPOvG/djbptRILLBN7HtnHFX9pn0WwDfKyFkPSir56UjTlFLv0IMljtq2FMnBNs32JL6PtUskG7hRxi6FQibWM0Yzn5ovi/aa/2w7vMxOE3bXHKU2HbsRIFRHRsLHE2oCt0PVVez224QQvr6EuB8dkDz2yQUVFexF8B8pPZSGArNxwKdQTbSQx3gNhaSh8QHFaggjr2rhHIIjy14WiVGY1IaFp0o/EhgTSHIExrqJhr5auc/tN0MRMZVK7L2ovDImj0YQFNcGwij66ZbzRlPMtmPt1BxrqF43QcqH2T6Y/4j+fV6quFXjc9Ct5N0iumXnRz7VX2Nx5T40pZnEVrnI3HK1ThfQjTYYo7+rCetD6QiShfXHF9BHcHiGc/t1gpftIFE0QRlujjTbGiA1wSOzQI6NhPHKsH9rQJNHAom5UGAyXXjrhmvJfQk0sjkTs6Ty/qhHwxZ2EbczXp7OIYmVoqrJ3aDSgJro9wBsaYNXbrdFK4e8hRC7akcUZvUZuptwP9z2PGf0IFe3rdn6uT7W5gZm7m7TuQmV14rlWUeKH/BIoIhFY mTnCK4GS xbsb6QtB7gYk2l87WJ7TZXfS89s0hFOv2OuoE5Q0gDia6EgItN5bT/2fsv4exl4nWF1cEVa1syMhjufJECMQSlsnRw+1Gtd0YUDfi6gtLlWno7sJQOJ7pKnLJk+dDjuFfj/ItD7ATIsRCpTA2oCYlq3QVJbelAy0cMsIG2EkWxdHJm8MSz6k6Is38jOUef5FEjdBUxqFubiO/k7UFLgDdkNJ2CzilyPeIAFxXjN1NsSaTC11ON+Dt9zdZhM4K7Flh+g1lCR7wPr3TECR1PRvWrBaW2DBFTSVWfLPQ 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: Add folio_xchg_access_time() wrapper, which is required to convert xchg_page_access_time() to folio vertion later in the series. Signed-off-by: Kefeng Wang --- include/linux/mm.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/linux/mm.h b/include/linux/mm.h index 1d56a818b212..1238ab784d8b 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -1794,6 +1794,11 @@ 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) /*