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 A9CA9C433DB for ; Wed, 10 Feb 2021 08:51:51 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 8749064E15 for ; Wed, 10 Feb 2021 08:51:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8749064E15 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id EA5FF6B0006; Wed, 10 Feb 2021 03:51:49 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id E574F6B006C; Wed, 10 Feb 2021 03:51:49 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D6C7E6B006E; Wed, 10 Feb 2021 03:51:49 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0168.hostedemail.com [216.40.44.168]) by kanga.kvack.org (Postfix) with ESMTP id BE18E6B0006 for ; Wed, 10 Feb 2021 03:51:49 -0500 (EST) Received: from smtpin17.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 879D0824556B for ; Wed, 10 Feb 2021 08:51:49 +0000 (UTC) X-FDA: 77801740338.17.twig53_54093ed2760e Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin17.hostedemail.com (Postfix) with ESMTP id 675A41858A272 for ; Wed, 10 Feb 2021 08:51:49 +0000 (UTC) X-HE-Tag: twig53_54093ed2760e X-Filterd-Recvd-Size: 2013 Received: from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190]) by imf15.hostedemail.com (Postfix) with ESMTP for ; Wed, 10 Feb 2021 08:51:48 +0000 (UTC) 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 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: 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. >