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 57FDFC54EE9 for ; Tue, 20 Sep 2022 01:46:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230024AbiITBqN (ORCPT ); Mon, 19 Sep 2022 21:46:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36726 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229986AbiITBqJ (ORCPT ); Mon, 19 Sep 2022 21:46:09 -0400 Received: from out30-54.freemail.mail.aliyun.com (out30-54.freemail.mail.aliyun.com [115.124.30.54]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D7FB03BC75 for ; Mon, 19 Sep 2022 18:46:07 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R191e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045170;MF=xhao@linux.alibaba.com;NM=1;PH=DS;RN=5;SR=0;TI=SMTPD_---0VQGgUhH_1663638364; Received: from 30.240.98.170(mailfrom:xhao@linux.alibaba.com fp:SMTPD_---0VQGgUhH_1663638364) by smtp.aliyun-inc.com; Tue, 20 Sep 2022 09:46:05 +0800 Message-ID: <4d1041d6-2163-1a90-7f25-daf72f7d139c@linux.alibaba.com> Date: Tue, 20 Sep 2022 09:46:03 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: [PATCH V3] mm/hugetlb: add available_huge_pages() func To: Mike Kravetz Cc: songmuchun@bytedance.com, akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20220917011528.11331-1-xhao@linux.alibaba.com> From: haoxin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 在 2022/9/20 上午7:58, Mike Kravetz 写道: > On 09/17/22 09:15, Xin Hao wrote: >> In hugetlb.c file, there are several places to compare the values of >> 'h->free_huge_pages' and 'h->resv_huge_pages', it looks a bit messy, so >> there add a new available_huge_pages() func to do these. > Thanks, I think the code looks a little better with this change. > >> Signed-off-by: Xin Hao >> Changes from v2 >> https://lore.kernel.org/linux-mm/20220916064127.1904-1-xhao@linux.alibaba.com/ >> - Convert is_resv_equal_free() to available_huge_pages() > I believe the above 'Changes from v2' information should be below the marker > '---' as it will not be included in the changelog. Ok, i will remove the changelog in the next patch. > >> --- >> mm/hugetlb.c | 14 +++++++++----- >> 1 file changed, 9 insertions(+), 5 deletions(-) > The changes look fine, > > Reviewed-by: Mike Kravetz