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 E0837CD3423 for ; Mon, 18 Sep 2023 23:59:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230306AbjIRX73 (ORCPT ); Mon, 18 Sep 2023 19:59:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58706 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229436AbjIRX71 (ORCPT ); Mon, 18 Sep 2023 19:59:27 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7DDF290 for ; Mon, 18 Sep 2023 16:59:21 -0700 (PDT) Received: from dggpemm100001.china.huawei.com (unknown [172.30.72.57]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4RqMCt2DfLzrSjG; Tue, 19 Sep 2023 07:57:14 +0800 (CST) Received: from [10.174.177.243] (10.174.177.243) 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, 19 Sep 2023 07:59:18 +0800 Message-ID: <255facf6-1d44-44eb-9d7e-5abf13f54499@huawei.com> Date: Tue, 19 Sep 2023 07:59:18 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 0/6] mm: convert numa balancing functions to use a folio Content-Language: en-US To: Matthew Wilcox CC: Andrew Morton , , , , , Zi Yan , Mike Kravetz , References: <20230918103213.4166210-1-wangkefeng.wang@huawei.com> From: Kefeng Wang In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.177.243] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) 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 On 2023/9/18 20:57, Matthew Wilcox wrote: > On Mon, Sep 18, 2023 at 06:32:07PM +0800, Kefeng Wang wrote: >> 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() > > This all seems OK. It's kind of hard to review though because you change > the same line multiple times. I think it works out better to go top-down > instead of bottom-up. That is, start with do_numa_page() and pass > &folio->page to numa_migrate_prep. Then do vm_normal_pmd_folio() followed > by do_huge_pmd_numa_page(). Fourth would have been numa_migrate_prep(), > etc. I don't want to ask you to redo the entire series, but for future > patch series. > > Also, it's nce to do things like remove the unnecessary 'extern' from > function declarations when you change them from page to folio. And > please try to stick to 80 columns; I know it's not always easy/possible. > Thanks for your review and suggestion, I will keep them in mind when sending new patch, thanks.