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: 15132 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp1552vqb; Mon, 9 Oct 2023 23:47:30 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEfZ5u0QBCA6w8lU0oECkF8/6NOTXZHJ3BKG6dFbJr3TuhwE1JDSPYaDrXyKnAsmviMn4uJ X-Received: by 2002:a05:6a20:1455:b0:10f:be0:4dce with SMTP id a21-20020a056a20145500b0010f0be04dcemr21811380pzi.8.1696920450115; Mon, 09 Oct 2023 23:47:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696920450; cv=none; d=google.com; s=arc-20160816; b=ZJghGLKs1JoiCmfgA489Y0hF5/O2YgKmzwWglSts+VlRj1AeJp/a8c6I4HP91mfqtW ZoeYzXuVBfsgXdxJ+o0iEQrCjFacvAal9fW8YDNt/jbGNYq80KkdF8hQehHWBDCZGdjP 7nWneCR4731xHVTEvuxNvbsGUDpzdjw6I5dPiDfGwHvl0FhaY1xm2m97f5MWn64STlIM lOm76LjFCW3GsmW+2SSBFf+NxOKWa2BsSrh01UUdfxMhD7HxmApemm//kgZczUYiBGge STjH9zTWD70IXW8tlsMn+N0/7GhAuHRQRkF+nGnK/lLUixJieSTQ37F7eEGAMHirOIAG CSRQ== 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=pHO2RFb77S6p5vRUfIU7LcZTlMeqVTeEEtwVL0WKhmc=; fh=wFvkM9osNU8sYLmqaGTuFInFBWzcJKoGp+WLNOXGmbE=; b=kHcLAVvChQ8r5DAgX0AW+SS8HaNr4k58i7Hf0mF3rfXkvSDncdiCN59zRJF6rscuBt BEKYsk7WWaXIz4upp1S8JwQWfQtfthU63VWb7M6/2ANS843YKDQ5AK9ZvrHR04lsSgi/ 5jAK5UI0RmKWkjxrk+St9hfHJXJecPHeti+mLhXJafitJCs1zsZUL2P3PWCyOg69DcgB 0vrItHv0iu3XnHckex7k9iYPB9LY4SNmSaAye5lJ0tQWCIqQDQAmwSJKef3nK4ck3tvM 0TLioGveSZDWTJhwpmfB22G5bl03XANRrT6MfpoSK58OddXZ8yx4RJ0P77RcZDpAOGM7 pD6A== 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 x5-20020a654145000000b0058bc1c8570csi7044501pgp.453.2023.10.09.23.47.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 23:47: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 E5A8F8290986; Mon, 9 Oct 2023 23:47:24 -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 S1442319AbjJJGrN (ORCPT + 20 others); Tue, 10 Oct 2023 02:47:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59488 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1442156AbjJJGrJ (ORCPT ); Tue, 10 Oct 2023 02:47:09 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B8BDC97 for ; Mon, 9 Oct 2023 23:47:07 -0700 (PDT) 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-Spam-Status: No, score=2.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no 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]); Mon, 09 Oct 2023 23:47:25 -0700 (PDT) X-Spam-Level: ** X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779350058169658825 X-GMAIL-MSGID: 1779350058169658825 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(-)