From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CD6B6E7D0A6 for ; Thu, 21 Sep 2023 18:51:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230373AbjIUSv0 (ORCPT ); Thu, 21 Sep 2023 14:51:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58982 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230289AbjIUSvB (ORCPT ); Thu, 21 Sep 2023 14:51:01 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 10853D5116 for ; Thu, 21 Sep 2023 11:41:44 -0700 (PDT) Received: from dggpemm100001.china.huawei.com (unknown [172.30.72.55]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4RrnQr4yqDztSw8; Thu, 21 Sep 2023 15:41:40 +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; Thu, 21 Sep 2023 15:45:55 +0800 From: Kefeng Wang To: Andrew Morton CC: , , , , , Zi Yan , Mike Kravetz , , Kefeng Wang Subject: [PATCH v2 0/6] mm: convert numa balancing functions to use a folio Date: Thu, 21 Sep 2023 15:44:11 +0800 Message-ID: <20230921074417.24004-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: dggems701-chm.china.huawei.com (10.3.19.178) To dggpemm100001.china.huawei.com (7.185.36.93) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. v2: - re-order the patch, drop 'extern' and wrap to 80 columns, suggested by Matthew - rename vm_normal_pmd_folio to vm_normal_folio_pmd and fix cpupid, suggested by Huang, Ying Kefeng Wang (6): mm: memory: add vm_normal_folio_pmd() mm: huge_memory: use a folio in do_huge_pmd_numa_page() mm: memory: use a folio in do_numa_page() mm: memory: make numa_migrate_prep() to take a folio mm: mempolicy: make mpol_misplaced() to take a folio sched/numa, mm: make numa migrate functions to take a folio include/linux/mempolicy.h | 5 +-- include/linux/mm.h | 2 ++ include/linux/sched/numa_balancing.h | 6 ++-- kernel/sched/fair.c | 12 +++---- mm/huge_memory.c | 29 ++++++++-------- mm/internal.h | 2 +- mm/memory.c | 49 ++++++++++++++++------------ mm/mempolicy.c | 22 +++++++------ 8 files changed, 69 insertions(+), 58 deletions(-) -- 2.27.0