Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp3358478rwb; Mon, 19 Sep 2022 20:40:04 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6ba7ZAYiSKuEi1H4m8DxQtcV13G9cOPwlNuJ7QKixJrTU6p3TIw6pPwx0XxwdtfpLZdxbJ X-Received: by 2002:a17:90b:4a12:b0:203:3482:d39e with SMTP id kk18-20020a17090b4a1200b002033482d39emr1617053pjb.145.1663645203782; Mon, 19 Sep 2022 20:40:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663645203; cv=none; d=google.com; s=arc-20160816; b=bXYm+buz3rvjmg6k1HAkfWSjFmstghW9al0ZWQBy0zXvuwmwF9LrxoforqpZj0g1pn Vv2R7Tq3pG9nRxwfC8slXvIPfgr8/dwHi06a4FUk+e9fEvsQXzOn7Yi9QWFs/XBdH1lW 7/3JJJPEuS7ppVNcHuyzVmR7BVD1eWZwtU8iVwT27YOT88Fjwo5+7sFY2TJiIrmItyy4 sSOy3LFz6ffVEudCbj3Z4JtSbg+ztqJf/+8MM7/qRRmrxgNcD3wwhnJAh4gahYtiAmYT vcCbkeqaWj2AXR32+2oeeRUuVsdhU5sp1aa9LIzQVr36sg7Y9oof2xsnXRTK6omqTgK0 rPZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=CJV8FwE+A5Dc4HYylZheQIWHRM8TrBG9/FpxnqYq3FU=; b=vnHUaJODDn97QGIjlH7W3Y0tgJtLBwpEQHKar6rsmQX2ZxkMs0Jzpyue8LXbRkDvri OK9GLUnXvXFWYAN7l8Kmq/cWxRAXrOuuXJNsNxCocQG1OTKnln6NJpY/5cTx9rooGxna BAhtIlNKJBwM49ZOgegVN4CriRzYBhNAIgnofBSzdnY0GnFyoNo9nwHkCNqM4YjGhjJA aZRE/oGHQNgoH8wpJZC7lHwGbShMFllVmsIsfCuxJUq9NfAekeFn3j+0v3zidfU7zCuh 2A+EyaIZFVGeqhDCAv+9eyaBlxTgCQVFTxI9wA7g9hL2U0JwqMYYp76AoM0/I4r8im9a c31A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=xwYkmWZc; dkim=neutral (no key) header.i=@suse.de; 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=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q4-20020a170902dac400b00174de06d91fsi408215plx.326.2022.09.19.20.39.52; Mon, 19 Sep 2022 20:40:03 -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; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=xwYkmWZc; dkim=neutral (no key) header.i=@suse.de; 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=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230002AbiITD3J (ORCPT + 99 others); Mon, 19 Sep 2022 23:29:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229905AbiITD26 (ORCPT ); Mon, 19 Sep 2022 23:28:58 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 32F5E5722B for ; Mon, 19 Sep 2022 20:28:53 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 6A4D11F85D; Tue, 20 Sep 2022 03:28:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1663644531; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=CJV8FwE+A5Dc4HYylZheQIWHRM8TrBG9/FpxnqYq3FU=; b=xwYkmWZcNtVN1aC1yMG5mIj7jRaK0NZgsF3FKII1oohRt1GgHZmG0+QaqVZjSnItFf5t3E DP1eerzJ91hvVfgBtEoezk7r6G0LEl20/JEmWcffvxEPA4zQax/9d25Vwu5X281AjM37x2 FvHwS2c3FTBjWRnT8UHBwjMiJ/DIut8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1663644531; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=CJV8FwE+A5Dc4HYylZheQIWHRM8TrBG9/FpxnqYq3FU=; b=C3TfYTIkGu0Z5CmOYMg+fBQ5E6o6j3kYGT0r5SSs/79n03UppkhfK4czp44lBP/hJvddi5 ZmbvbBFCCud//aAQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 0358B13ABD; Tue, 20 Sep 2022 03:28:50 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 1vWfOXIzKWOidAAAMHmgww (envelope-from ); Tue, 20 Sep 2022 03:28:50 +0000 Date: Tue, 20 Sep 2022 05:28:49 +0200 From: Oscar Salvador To: Xin Hao Cc: mike.kravetz@oracle.com, songmuchun@bytedance.com, akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH V3] mm/hugetlb: add available_huge_pages() func Message-ID: References: <20220917011528.11331-1-xhao@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220917011528.11331-1-xhao@linux.alibaba.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS 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 On Sat, Sep 17, 2022 at 09:15:28AM +0800, 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. > > Signed-off-by: Xin Hao Reviewed-by: Oscar Salvador -- Oscar Salvador SUSE Labs