Message ID | 20231018140806.2783514-1-wangkefeng.wang@huawei.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp4817632vqb; Wed, 18 Oct 2023 07:09:15 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEA7yUAuERcH5uEKoPogvVIBDYt3e0NK860RIcECYQxPuZ9Ry52nPfI5uc67Qt3qkdBAAVz X-Received: by 2002:a62:b60b:0:b0:6be:a1e:952 with SMTP id j11-20020a62b60b000000b006be0a1e0952mr5343673pff.2.1697638155023; Wed, 18 Oct 2023 07:09:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697638155; cv=none; d=google.com; s=arc-20160816; b=NR7338fLIHHKbC3SRyO6RPoDr0p4hL6TVgLyuTqWXGWRr3D7oSYijY5m3gFE9rxtmk u+GilxPn62pNP0c8hH6oegYTjZt2EAtCvQb5dXim0q7sysZul1cNGi/bVXkzoM3w8cao Xs1ajzgJhkUDvEKnNDoe6R1CzLbkQ/bwf0lJerkqufCQjoRwKmqLuUO7hYSxw2J9sTyt eEGc9YMt5iouMrc2/S/Ubjy9juSR7aJp3ezt98lRprlRS72BcmHwCUhiRgikGEPQKsms l//xe/SOO5zzRufk1iPUt/O70j3NX4GkaaQZlBm+Nhq6sQTxsvRDS0oT35aGXHI9b1BL wsKg== 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 :message-id:date:subject:cc:to:from; bh=k7pqMFp7eOMdjWpB2AgxfOcVOmx6eC3nibJvH4YFzYI=; fh=Q+Hibf2y+6rOlBpt37Lm5i0wTMmcQsnxMBqJTtvbZCs=; b=oKABrE3JdzCxWXAx8oqb27m7CRi2fqPiLURHajSobMLsUkpDQKPEVIp/po8LjSHRtg EqcKhKCvim8Z+SDIBP+jZ7LS0+q3OvDGOhIdZoka0nIS6Iox2VOgn3DwfCBvK9c3yfly hAKlnU+5SPE/5JTqMtfzkz27EHX/XYmXeuInu6nMc3w1QNNdTXhmmcS38nAHzi9WD/US 1GuQdo5lKvcLk2uIWQCZAweUs/DY58Vw51V4mbK0fjEvUUQ1IAQnFkZ79nyVU9iHEYCH x1VVdF6igE2d586XL7wMiBtk+h7ZCwQ/NRpyAaryNay0eZ/HoPBgWqJx4VxG2td3HuBY ZJdg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id j11-20020a056a00234b00b0068fb6fc3ff1si4147760pfj.209.2023.10.18.07.09.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 07:09:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (Postfix) with ESMTP id 4BFD58030B8D; Wed, 18 Oct 2023 07:09:13 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344846AbjJROJI (ORCPT <rfc822;zwp10758@gmail.com> + 23 others); Wed, 18 Oct 2023 10:09:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60122 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231901AbjJROJG (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 18 Oct 2023 10:09:06 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E54B795 for <linux-kernel@vger.kernel.org>; Wed, 18 Oct 2023 07:09:02 -0700 (PDT) Received: from dggpemm100001.china.huawei.com (unknown [172.30.72.56]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4S9Xfg652yzCrR7; Wed, 18 Oct 2023 22:04:59 +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:08:58 +0800 From: Kefeng Wang <wangkefeng.wang@huawei.com> To: Andrew Morton <akpm@linux-foundation.org> CC: <willy@infradead.org>, <linux-mm@kvack.org>, <linux-kernel@vger.kernel.org>, <ying.huang@intel.com>, <david@redhat.com>, Zi Yan <ziy@nvidia.com>, Ingo Molnar <mingo@redhat.com>, Peter Zijlstra <peterz@infradead.org>, Juri Lelli <juri.lelli@redhat.com>, Vincent Guittot <vincent.guittot@linaro.org>, Kefeng Wang <wangkefeng.wang@huawei.com> Subject: [PATCH -next v3 00/19] mm: convert page cpupid functions to folios Date: Wed, 18 Oct 2023 22:07:47 +0800 Message-ID: <20231018140806.2783514-1-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII 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-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 18 Oct 2023 07:09:13 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780102625915388852 X-GMAIL-MSGID: 1780102625915388852 |
Series |
mm: convert page cpupid functions to folios
|
|
Message
Kefeng Wang
Oct. 18, 2023, 2:07 p.m. UTC
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 functions are converted to folio ones. page_cpupid_last() -> folio_last_cpupid() xchg_page_access_time() -> folio_xchg_access_time() page_cpupid_xchg_last() -> folio_xchg_last_cpupid() v3: - fix finish_mkwrite_fault built warning reported-by lkp - address the wp_page_reuse() comment of Matthew, also update changelog of change_pte_range() and wp_page_reuse() a bit - rebased on next-20231018 v2: - add virtual into folio too - re-write and split patches to make them easier to review - rename to folio_last_cpupid/folio_xchg_last_cpupid/folio_xchg_access_time - rebased on next-20231013 v1: - drop inappropriate page_cpupid_reset_last conversion from RFC - rebased on next-20231009 Kefeng Wang (19): mm_types: add virtual and _last_cpupid into struct folio mm: add folio_last_cpupid() mm: memory: use folio_last_cpupid() in do_numa_page() mm: huge_memory: use folio_last_cpupid() in do_huge_pmd_numa_page() mm: huge_memory: use folio_last_cpupid() in __split_huge_page_tail() mm: remove page_cpupid_last() mm: add folio_xchg_access_time() sched/fair: use folio_xchg_access_time() in numa_hint_fault_latency() mm: mprotect: use a folio in change_pte_range() mm: huge_memory: use a folio in change_huge_pmd() mm: remove xchg_page_access_time() mm: add folio_xchg_last_cpupid() sched/fair: use folio_xchg_last_cpupid() in should_numa_migrate_memory() mm: migrate: use folio_xchg_last_cpupid() in folio_migrate_flags() mm: huge_memory: use folio_xchg_last_cpupid() in __split_huge_page_tail() mm: make finish_mkwrite_fault() static mm: convert wp_page_reuse() and finish_mkwrite_fault() to take a folio mm: use folio_xchg_last_cpupid() in wp_page_reuse() mm: remove page_cpupid_xchg_last() include/linux/mm.h | 30 +++++++++++++++--------------- include/linux/mm_types.h | 22 ++++++++++++++++++---- kernel/sched/fair.c | 4 ++-- mm/huge_memory.c | 17 +++++++++-------- mm/memory.c | 38 ++++++++++++++++++++------------------ mm/migrate.c | 8 ++++---- mm/mmzone.c | 6 +++--- mm/mprotect.c | 16 +++++++++------- 8 files changed, 80 insertions(+), 61 deletions(-)