From patchwork Mon Sep 18 10:32:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 13389373 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 A7472CD37B0 for ; Mon, 18 Sep 2023 10:32:54 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2DF3A6B02CF; Mon, 18 Sep 2023 06:32:54 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 268456B02D2; Mon, 18 Sep 2023 06:32:54 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 131636B02D3; Mon, 18 Sep 2023 06:32:54 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id F41CE6B02CF for ; Mon, 18 Sep 2023 06:32:53 -0400 (EDT) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id BEF401A01F5 for ; Mon, 18 Sep 2023 10:32:53 +0000 (UTC) X-FDA: 81249355026.20.48ED26C Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by imf29.hostedemail.com (Postfix) with ESMTP id 39A97120025 for ; Mon, 18 Sep 2023 10:32:50 +0000 (UTC) Authentication-Results: imf29.hostedemail.com; dkim=none; spf=pass (imf29.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.188 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=1695033172; 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=EkTuRrb4II2hCzG9QkRhR8vsW+hK+/fFdQbR2ztLeXw=; b=iVP99ehp5opw0yy5ylX/Tu7oeq5p6+Rw2lTiM8g2Mm0PK7gKyOeaYiDDnhU2D5t7sqXQTa Ip4TqI8Jc+yOyYsd8yr0mtUAIVZbO+JHt/uEtbybf6FtNPtN92A0I85exK/TTjHy2l7yHY OonwKT1s1O2SrLMzu1Iylwp1Sa/1DBw= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1695033172; a=rsa-sha256; cv=none; b=ttsil+LH3DoPQ6ZRdzn3PpwRSU9Z/EnB/tyao0iyvCnBJJlmHdqBCOUFholsWJY8/+kmPq aJfroNNhzoHgZ+Qcp2fq2TzgoRPkRjwvlgjJRVU54nU6iJMuWFLct5exU2K3csRXB7Vv6d 6aeCQcxt2kDyoKAamxnuiA+caoL3K30= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=none; spf=pass (imf29.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.188 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.57]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4Rq1JH2n8mzVkyT; Mon, 18 Sep 2023 18:29:51 +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; Mon, 18 Sep 2023 18:32:45 +0800 From: Kefeng Wang To: Andrew Morton CC: , , , , , Zi Yan , Mike Kravetz , , Kefeng Wang Subject: [PATCH 0/6] mm: convert numa balancing functions to use a folio Date: Mon, 18 Sep 2023 18:32:07 +0800 Message-ID: <20230918103213.4166210-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: dggems706-chm.china.huawei.com (10.3.19.183) To dggpemm100001.china.huawei.com (7.185.36.93) X-CFilter-Loop: Reflected X-Rspamd-Queue-Id: 39A97120025 X-Rspam-User: X-Stat-Signature: 84zj711im45xmnowjx1fpi17rup3c4i5 X-Rspamd-Server: rspam03 X-HE-Tag: 1695033170-553677 X-HE-Meta: U2FsdGVkX18OjFoQdu5AJdbG0obd/Rg+6LAj7DAqmOPrF6cIVyYqjSESx2LBko7ZrHh2SrkfIbYCvkWzkCrWqSzv5Vets+ZNfYivFbuDAG/y6Vu650uiew0UUtCAlllt+XPGf0EC9FVNw7ZrwrBm81H/jbRFpEQl0c1roKwxRoAkk3xm6NsKV4mzDRlmmCAeT3ypuknUNuW2Sb9Na6X+YkSEcBxHNtngiIN3CIs5+KHTNS0zmNAiDZJwzHsmj1Ppsl2cwkVRGURXbm9idssVb/OOxaRaXAyuWUW90en09c9pqZFk87WBm2oEAiQXqCAPY2mFMNFtMLu3D0HRy7iWUk9zj7a6H+niE3QNgQHaGJJr+5Akx5lN6T7SNJMU5OxLigcCv7ImI3hkpk/oxXX4vllujDQ6brtCNqw/xs4MLyNKa8EtQnqcSdyOnhPvGCex0knfIz2go9QkLOAnxJK9Bw5kxT7KVHEg575ryegdmwvLCpy3gJPkzfpMnkQbmPlL9zZIDcnS9tWwkgotaXMdpjVNUcHCDSEEbOQneNna0ZBwgReI2OzpvQzD69jOCisTT+Enj3gQfSPrLIsmNIsx0xK1VIYuxkdFfkwwfDFuu7jiyoQf4sCZq1gCXDaQQTn07utCLrPqVzKNCg4CNBWFwsme3ErUycKRp8PtAdxHA1bnSja6fnFSjt/fUHQFoLMY7E/hBpwnmMIT5DfuurXt/exoOU2QNYdzHEKVQQVWb2I6qeq84DB2gXh+T0z9Esa+tCdTsnz7rLklxZcs+RECINYgymK/ifDM/6D6coxt13nuiidfcSqma3hZpsEzleh6uHk9ROMSekmPyUFEFcBeYF6pnzfGEYd2Ai/M7UH5us0eHfyTtVYd5wSJmRlAiCHV6URjRseHZwgATIog/kHRC2g4I4rsmb67/KEKk9U3b4Sdtv0ZG8vF9UykZa6oRhbijXFZM4DDk52ynF3obCn YonDCFy+ nc67vFraoU6GM3Z99DowhHnupbokprbpuf1mIdGYoONoGXaUoH1jCS07APAE7lLfxe0FyvOe96ZpAkepFy6G1pmnAJscbboEd6/V5+C/BgnamCA1lFj6sYUYxHg== 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 do_numa_pages only handle non-compound page, and only PMD-mapped THP is handled in do_huge_pmd_numa_page(), but large, PTE-mapped folio will be supported, let's convert more numa balancing functions to use/take a folio in preparation for that, no functional change intended for now. Kefeng Wang (6): sched/numa, mm: make numa migrate functions to take a folio mm: mempolicy: make mpol_misplaced() to take a folio mm: memory: make numa_migrate_prep() to take a folio mm: memory: use a folio in do_numa_page() mm: memory: add vm_normal_pmd_folio() mm: huge_memory: use a folio in do_huge_pmd_numa_page() include/linux/mempolicy.h | 4 +-- include/linux/mm.h | 2 ++ include/linux/sched/numa_balancing.h | 4 +-- kernel/sched/fair.c | 12 +++---- mm/huge_memory.c | 28 ++++++++-------- mm/internal.h | 2 +- mm/memory.c | 49 ++++++++++++++++------------ mm/mempolicy.c | 20 ++++++------ 8 files changed, 65 insertions(+), 56 deletions(-)