From patchwork Tue Oct 10 06:45:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 13414849 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 476FBCD68F4 for ; Tue, 10 Oct 2023 06:47:15 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 21BA66B01F7; Tue, 10 Oct 2023 02:47:14 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1CAF96B01F9; Tue, 10 Oct 2023 02:47:14 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E752B6B01F8; Tue, 10 Oct 2023 02:47:13 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id D167D6B01F6 for ; Tue, 10 Oct 2023 02:47:13 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id AFDDC1401A0 for ; Tue, 10 Oct 2023 06:47:13 +0000 (UTC) X-FDA: 81328619946.14.ACABE50 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by imf22.hostedemail.com (Postfix) with ESMTP id 92A4DC0025 for ; Tue, 10 Oct 2023 06:47:10 +0000 (UTC) Authentication-Results: imf22.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf22.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1696920431; 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=pHO2RFb77S6p5vRUfIU7LcZTlMeqVTeEEtwVL0WKhmc=; b=jxVGayFraZ4+lFYS5seteGHqsb8uYWjc9vM/YBb4VD/hSzjFQGENw3XNa2uCU/LV/LKAS4 9hf7zj0OBy0GcVbAeFr3f7OVJb9JAnZJuFQ4AyFW1IlXTJR6/U3OwYqRc79qxLsmhvX4X3 cWQB7TrUMAZFa/JsnRr3PrD+grUtibY= ARC-Authentication-Results: i=1; imf22.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf22.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1696920431; a=rsa-sha256; cv=none; b=ixKILYFBi4LkreBt0rCD6YjuZ2RA0YVEFiBYA9PYJ2lrIk6gYiZ95GYcF9q4x4IyHZDd2a GNO+AKbwz2SlWMuaOrvMk6mxlpA+AqNLiAOmBTVBu9YofrbopDkNhrU3eeWCj2JvagBsFO 4xySHDezuil5ehn3Te0uZ6TkaVynWXQ= Received: from dggpemm100001.china.huawei.com (unknown [172.30.72.54]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4S4RF51xGTzVlMQ; Tue, 10 Oct 2023 14:43:37 +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, 10 Oct 2023 14:47:04 +0800 From: Kefeng Wang To: Andrew Morton CC: , , , , , Zi Yan , Kefeng Wang Subject: [PATCH -next 0/7] mm: convert page cpupid functions to folios Date: Tue, 10 Oct 2023 14:45:37 +0800 Message-ID: <20231010064544.4162286-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: dggems701-chm.china.huawei.com (10.3.19.178) To dggpemm100001.china.huawei.com (7.185.36.93) X-CFilter-Loop: Reflected X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 92A4DC0025 X-Stat-Signature: 9mu57xmcw7t5dkq8bmt73a5ftht3dzuw X-Rspam-User: X-HE-Tag: 1696920430-373252 X-HE-Meta: U2FsdGVkX1+CWkI0TXRjYKnm71ylCtat77bByKo9AIqU5DVkUrd1Z24kNUwwQOm/pt3/LkyjOgwFQgtHUAu23o29ELb23SB5cHXVQ9IKGZXStYPRkleNoBI34wFb8Nj9UUI91aGF5e6nOGX74SnpUbi/UdE/c99qXLtNYNEI96glB+PA0yy402VVHBEhZ77bXuChQN1symr14J9Urvc++ue4FJYcYRYUBFljyUonYceusi/nc+54HhmjdTC3yuOC8qfzfnMtoNpzhYlvzODrUKqnYVfzyvzCvJC6JyjFCGfFSeeBujvWXfZCkHxidJmmbztZni5yXCTmTBneFcG8Vekk2H59T6F/9ilKxSIn3mUwPYaszmElrwYxGWpXmkgTA6Z/eg9HJN1rx8gnfBnBdk4yvdm9dLT1DSsHq3mQXaziNhm1TZwxrbHd70nMKLVPicy6FunzW8n34qvLSjluaTB6TEj1LNrxCmEXE2OBV+fhcDIogGhWi0VTinh3oDJo/WfXLd1jpGG8+BYUzlHvpo3ou+BYDRaDqkcYtB+hjTg6ZlCW82l+lIkog8rn+UqkaxQAI3tFmF8rtN1c4Mjtv4DHVMDT1ooxBAheC6+GODVahvxhAoPH9ZUu+lJNJJznIKOBJMgW4xaLbXpzJQd2yd94MKZ6jMaMiUBUqx7aYHvF4fZ9fJmVxVg1ahY7ormhGXAjr0WI4d3rouXJRpXm3k//3+No3L/+aiW/oTwZTyu89JI5955PWjuTXxuQSe+rgru4E3Frd6T1vQTqfP/85D3V7vnvKi4uvFKb9t/Qz0swercunnaJSLF/K5IhY6OdXeQWyyqatwp5hga/tD5EH/a6ce/7zbfqWIOVewtYGtkwnzyZRc0JKLlPyCC/0WMTY+Ot+BhtxHO2/C5FCVcz7z+t6EL+0XAP143wZHX6iP0NPcYryuoJy2JkyBXM/9OsCXJz3yBs0b4KwBUKPOp i1Yiig5p twxcDI7TcDFx4+aDCcIyvh/glBmtntN2/S6h4KNhXthHR21kOJ6yu/cpZa263duNpP4b2ZlNkxrW9BivKfHdQWzH/Jl4lQilBV7TT/Lm/M4zGXS54omNlXNRAzQ== 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_xchg_last(), xchg_page_access_time() and page_cpupid_last() are converted to folio ones. v1: - drop inappropriate page_cpupid_reset_last convertion from RFC - rebased on next-20231009 Kefeng Wang (7): 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() include/linux/mm.h | 30 +++++++++++++++--------------- 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/mmzone.c | 6 +++--- mm/mprotect.c | 16 +++++++++------- 8 files changed, 70 insertions(+), 59 deletions(-)