From patchwork Tue Sep 26 00:52:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 13398592 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 F05E2E6FE31 for ; Tue, 26 Sep 2023 00:54:01 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 814E38D0060; Mon, 25 Sep 2023 20:54:01 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7C31A8D005C; Mon, 25 Sep 2023 20:54:01 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6B2D18D0060; Mon, 25 Sep 2023 20:54:01 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 57BE48D005C for ; Mon, 25 Sep 2023 20:54:01 -0400 (EDT) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 2E537160D10 for ; Tue, 26 Sep 2023 00:54:01 +0000 (UTC) X-FDA: 81276926682.12.547B1E4 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by imf11.hostedemail.com (Postfix) with ESMTP id 0788540003 for ; Tue, 26 Sep 2023 00:53:58 +0000 (UTC) Authentication-Results: imf11.hostedemail.com; dkim=none; spf=pass (imf11.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=1695689639; 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: references; bh=YRO6InEM+VYZTQRR37m3LjxCh0XX4o4vBTRQmLLm0DU=; b=z0vDs0mIgge7olxTvWFrpvk8H/fJnAAcmuRbcXk4M6N6SPw4Tapf1Mfj4z6xwMhdKWPRMh y+/o+5i6YZqPT62GcqyjXtSircGWqG8WW4Pdyht9O+VZZ5vDDB8h9n15kLvL7MqtyoHsIX AUaf8ubKzQMJfCrjRTodhWVIg57PbQU= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1695689639; a=rsa-sha256; cv=none; b=AO05zUcQOma6SiBR2E4JZs0ulkOIrJ5sKaUAsZnimEZMHcQ0n+V8bUwbWTN0saoCoHk+W0 H9+KfNE8nkX21ltHjCLBi2QCF1xqaEdMMUYyZ+DoZkkwW/tlTHVQq/h8MzdruQv2SZ/Uai 4b+mp4VMlhmnt+VATj4y3VVea8KhAkg= ARC-Authentication-Results: i=1; imf11.hostedemail.com; dkim=none; spf=pass (imf11.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.56]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4Rvh4Z2q8YzrSt5; Tue, 26 Sep 2023 08:50:54 +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; Tue, 26 Sep 2023 08:53:07 +0800 From: Kefeng Wang To: Andrew Morton CC: Mike Rapoport , Matthew Wilcox , David Hildenbrand , , , , Zi Yan , Kefeng Wang Subject: [PATCH -next rfc 0/9] mm: convert page cpupid functions to folios Date: Tue, 26 Sep 2023 08:52:45 +0800 Message-ID: <20230926005254.2861577-1-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 X-Originating-IP: [10.175.112.125] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To dggpemm100001.china.huawei.com (7.185.36.93) X-CFilter-Loop: Reflected X-Rspamd-Queue-Id: 0788540003 X-Rspam-User: X-Rspamd-Server: rspam11 X-Stat-Signature: 1x8i9e3wpwh5yd1fc369ygwkdda9sw8k X-HE-Tag: 1695689638-725754 X-HE-Meta: U2FsdGVkX19UzgIZWBlZna3xrXw5J5LjpB07lgDEQ8imH+KoMTuhe1IQEtcKK8dC8Z83PMvh1bQtLDeI4VIF1hnfEN0CQgqdtih8icsBAth5R0vpCeiPcUxI1SscFh4cUqxXwERuvlaUveqdHEHVKjIVTlUYpWjX2i9CpTZIT/aXtoMy+LAzBcVyrILgeItspIHnFndeGCYx8fVnLOSlSanVIstJDOf/mxsX26Pm0VEJvLaT+kaM97yXDMJZeFIhli0fKo3wbg9oqXe1wYir9Sus3zHbcengnuYnvMiFI12At7/ZmlGKUgFJvHpWRR8m9x9A458V7uUJHRWrf938YyCxvQmajklcTrpPzPxUaVKYP0i5Ez3gg4uwBrem0DkxX7lspSAsdLcGU1NHvd5Ecqsi0C2svkrwT85GkIEFouoyQ61x382XDKcEo+5oo6iOtial4ONE9tTVQGoxfO/T/xfn3OwelNM0NBBd2TGE0nM4pEuz6i/xjt3HUilOLDWcxNrbco2UeM5feskNkzneg5PsqGJyZjthbehymerRWzhWxSkaqdfzsIKQg4p0f/0EIzPIs8bfGDzdfZ2MHPdY4EP6LePtrsRKnvqPCUCpbefVwRaltG6ds0n1g2girIHbDYNJi/o7CQIFrB0wPffzIlQYSkh7JJpIb5L9XUxurwk4qry7ee07k5F1KmMjgc4lXYMN2pKCl+wQZCTckSTkgVNj8Xz0EZqlFbHWPuvkfCKoUSLs4wo1Xi7gVKE276RsHilBuhvDSCmhKVp7CuYEt4+EmQyBQc41kCcRqio+/KxENBIWuDaKL3+Q+V52ecxG4ksrVBtj1imaTPH9rSIHLG6LesAc/4634tnfzX6bcS5BD294DX44fn5mDyjcJWvBk6fpJ/BozfhXF1g5De0jr1ua3qvlC1tS8PJd179OIt+zMzEOTL6Z+ETSDH58MelBZb1cEdgo8Tu8qcvE+ZQ 3ImjUF1L fnu6g81K1q5VFSNW5pDMO8uLdINWceQmBjbr0XjlnMQgK9hgQiM1i6o3MKWSnwgGhnQ/D+aQEi3MFnnrv2pOagAN9sCw8u0J7kEertbxK36SZU7lNHKWH61Fanw== 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: The cpupid(or access time) used by numa balancing is stored in flags or _last_cpupid(if LAST_CPUPID_NOT_IN_PAGE_FLAGS) of page, this is to convert page cpupid to folio cpupid, a new _last_cpupid is added into folio, which make us to use folio->_last_cpupid directly, and the page_cpupid_reset_last(), page_cpupid_xchg_last(), xchg_page_access_time(), and page_cpupid_last() are converted to folio one. Kefeng Wang (9): mm_types: add _last_cpupid into folio mm: mprotect: use a folio in change_pte_range() mm: huge_memory: use a folio in change_huge_pmd() mm: convert xchg_page_access_time to xchg_folio_access_time() mm: convert page_cpupid_last() to folio_cpupid_last() mm: make wp_page_reuse() and finish_mkwrite_fault() to take a folio mm: convert page_cpupid_xchg_last() to folio_cpupid_xchg_last() mm: page_alloc: use a folio in free_pages_prepare() mm: convert page_cpupid_reset_last() to folio_cpupid_reset_last() include/linux/mm.h | 40 ++++++++++++++++++++-------------------- include/linux/mm_types.h | 13 +++++++++---- kernel/sched/fair.c | 4 ++-- mm/huge_memory.c | 17 +++++++++-------- mm/memory.c | 39 +++++++++++++++++++++------------------ mm/migrate.c | 4 ++-- mm/mm_init.c | 1 - mm/mmzone.c | 6 +++--- mm/mprotect.c | 16 +++++++++------- mm/page_alloc.c | 17 +++++++++-------- 10 files changed, 84 insertions(+), 73 deletions(-)