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=-7.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,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 EA39BC433DB for ; Thu, 4 Mar 2021 09:35:57 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 659C264F20 for ; Thu, 4 Mar 2021 09:35:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 659C264F20 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 6C66E6B0005; Thu, 4 Mar 2021 04:35:56 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 64F626B0006; Thu, 4 Mar 2021 04:35:56 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4C90B6B0007; Thu, 4 Mar 2021 04:35:56 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0045.hostedemail.com [216.40.44.45]) by kanga.kvack.org (Postfix) with ESMTP id 2D6896B0005 for ; Thu, 4 Mar 2021 04:35:56 -0500 (EST) Received: from smtpin02.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id D905B180ACC3D for ; Thu, 4 Mar 2021 09:35:55 +0000 (UTC) X-FDA: 77881685070.02.AEE5E8B Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by imf18.hostedemail.com (Postfix) with ESMTP id 0585B2000390 for ; Thu, 4 Mar 2021 09:35:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1614850554; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=P1qJfzyEGRuuV0eDxn3pbmVD8vuajk2myHnjwQFS5/s=; b=HRYmrpXQeu9QYWBkjqtDOORGUGYLqJ6IZK9C+Du4hkCpELsf/WTFU/ljySl9SsxjvA6Pue viBBkyBJag1vCeTzctO+TlFPq+lbmY4NpzKAt5wEgrYHHFCHDwWDCvTw2V7hLD28q7uBPJ +LtU7Ewmdj1EaYzcppibLYZWG5uWSFU= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-259-q6eMNokkMuyGV7rcPv2jCQ-1; Thu, 04 Mar 2021 04:35:52 -0500 X-MC-Unique: q6eMNokkMuyGV7rcPv2jCQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 22852108BD0E; Thu, 4 Mar 2021 09:35:51 +0000 (UTC) Received: from [10.36.113.171] (ovpn-113-171.ams2.redhat.com [10.36.113.171]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9B27470911; Thu, 4 Mar 2021 09:35:49 +0000 (UTC) Subject: Re: [PATCH] mm/hugetlb: suppress wrong warning info when alloc gigantic page To: Mike Kravetz , Chen Wandun , akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20210219123909.13130-1-chenwandun@huawei.com> <46e76ac3-def1-80d4-14f1-61f7cd00d033@oracle.com> From: David Hildenbrand Organization: Red Hat GmbH Message-ID: Date: Thu, 4 Mar 2021 10:35:48 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: <46e76ac3-def1-80d4-14f1-61f7cd00d033@oracle.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 0585B2000390 X-Stat-Signature: 1iemgw1qsftqt5e5tdhzixyjnmkx3j79 Received-SPF: none (redhat.com>: No applicable sender policy available) receiver=imf18; identity=mailfrom; envelope-from=""; helo=us-smtp-delivery-124.mimecast.com; client-ip=216.205.24.124 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1614850554-54363 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 19.02.21 20:14, Mike Kravetz wrote: > On 2/19/21 4:39 AM, Chen Wandun wrote: >> If hugetlb_cma is enabled, it will skip boot time allocation >> when allocating gigantic page, that doesn't means allocation >> failure, so suppress this warning info. >> > > Normally the addition of warning messages is discouraged. However, in > this case the additional message provides value. Why? > > Prior to the commit cf11e85fc08c, one could have a kernel command line > that contains: > > hugepagesz=1G hugepages=16 > > This would allocate 16 1G pages at boot time. > > After the commit, someone could specify a command line containing: > > hugepagesz=1G hugepages=16 hugetlb_cma=16G > > In this case, 16G of CMA will be reserved for 1G huge page allocations > after boot time. The parameter 'hugepages=16' is ignored, and the warning > message is logged. The warning message should only be logged when the > kernel parameter 'hugepages=' is ignored. > > IMO, it make sense to log a warning if ignoring a user specified parameter. > The user should not be attempting boot time allocation and CMA reservation > for 1G pages. > > I do not think we should drop the warning as the it tells the user thay > have specified two incompatible allocation options. > I agree. It has value. -- Thanks, David / dhildenb