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 X-Spam-Level: X-Spam-Status: No, score=-5.5 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 51B3EC433E0 for ; Wed, 10 Feb 2021 08:54:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0D7B664E57 for ; Wed, 10 Feb 2021 08:54:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230028AbhBJIyD (ORCPT ); Wed, 10 Feb 2021 03:54:03 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:12167 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229464AbhBJIw1 (ORCPT ); Wed, 10 Feb 2021 03:52:27 -0500 Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4DbD3T2wpGzlHrV; Wed, 10 Feb 2021 16:49:57 +0800 (CST) Received: from [10.174.179.149] (10.174.179.149) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.498.0; Wed, 10 Feb 2021 16:51:41 +0800 Subject: Re: [PATCH] mm/hugetlb: use some helper functions to cleanup code To: David Hildenbrand CC: , , , References: <20210210065346.21958-1-linmiaohe@huawei.com> <4bb381fc-eae5-effd-214d-8d62e66da272@redhat.com> From: Miaohe Lin Message-ID: Date: Wed, 10 Feb 2021 16:51:41 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <4bb381fc-eae5-effd-214d-8d62e66da272@redhat.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.179.149] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021/2/10 16:35, David Hildenbrand wrote: > On 10.02.21 07:53, Miaohe Lin wrote: >> We could use pages_per_huge_page to get the number of pages per hugepage, >> use get_hstate_idx to calculate hstate index, and use hstate_is_gigantic >> to check if a hstate is gigantic to make code more succinct. >> > > Another suggestion, please collect and group your cleanups for a subsystem and send them in a single cleanup patch series where possible. Again, makes life easier for reviewers and maintainers. > Many thanks for your suggestion again. I will keep it in mind. :) > Thanks! > Thanks a lot. >