Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp3296089rwb; Mon, 19 Sep 2022 19:08:08 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4/3VqUeuy09rAZewvi9JVV4z8RstIMql05285l+xqAfeh08xGwqHBJi5pz1o4ZsbN1hJhT X-Received: by 2002:a63:8ac8:0:b0:438:63d8:42c2 with SMTP id y191-20020a638ac8000000b0043863d842c2mr18270794pgd.229.1663639687952; Mon, 19 Sep 2022 19:08:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663639687; cv=none; d=google.com; s=arc-20160816; b=Nu+I7sryLdeC3traz2HFD2vtFpR6252yvyRElibucMXNkug4eKYQD2iGLkeBD6BHuE RW8JITuwi39F1Yk025jD+NRO0W6fKTJKP74/EYpreepXFLKZVhsMiBLLIG2NAakSjOYA phm1CPQUlkSPJc2dj1awgCyVtKqd092FZhdi247TDg/E5J0XyhX/5vvt3pcGcMzAsfT6 Esov2fIyWPDzm5LmaacJzhahuVmwYZbbRl/umQOikHFJQVekTe1WZV7ThSv2a1SupssX MN9foz1SxAhKtIcg8GpnDIkL9P2YPc3d/XCmcWIu1QI599faAfjVIsIRqec99qYVS2GH Cgng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:subject:user-agent:mime-version:date:message-id; bh=UNUhdJneyK7RGJWv95kLbfrpxkrt+noXel/wAV2R7Ro=; b=BsEdXZyiFjwAWr3V/inpIgX8n752RjHKf2ySN6QcNMgHFLIUQpfxQexPEKxdIhmINN iJJxk+afCU7QKwkEQff3CQYrZST8qmwfDFrcV2JIzB2rdELKreFe/JZvst/iBKojjxVS k8pubPQXXrIbyIdWPJYHKkWe39T2l/4J4Z1IXzCyGaAwtK+MvJCTIMcUUde9iWReA1Rt TYU2LDhxm9IiKQP0tDnHpPHPc06VCVKTthYGJH7zkGf7wHniwAlgsWkps4GkdBVW8puH Vim+VjjEhLMUlcEsZEZV9ofueqfrpMiLep4JmlIYkgMPIUgnx/wnedX4z5KgklzxnBkA 3Zjg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t187-20020a6378c4000000b00438c64bda0bsi270147pgc.162.2022.09.19.19.07.56; Mon, 19 Sep 2022 19:08:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230015AbiITBqM (ORCPT + 99 others); Mon, 19 Sep 2022 21:46:12 -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 X-Spam-Status: No, score=-10.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE, SPF_PASS,UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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