Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1606188pxb; Thu, 4 Mar 2021 16:09:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJxRp7/kHIUJfNcfJAfnIwkN1eOZOH9HE1G06hWmtAJOlquy9SmrUmCUFZlXmGGX23oHitEC X-Received: by 2002:a05:6e02:1b04:: with SMTP id i4mr6520705ilv.89.1614902973255; Thu, 04 Mar 2021 16:09:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614902973; cv=none; d=google.com; s=arc-20160816; b=L/xsfmTrKXj36wI+b56A0jXmLMuXTWn6+VTvVRk+0Uoq8jUzvajIKstRUevWcJKYn2 RFWFwumpttQATDcJBmqICKsInJVJpsnP4k+vv9pUJPLucmACZkjfiRz90RGEcM5RRLGZ 5meUL2gG5irqneVQmey6+rqEbTKRpRD8nWSpc4sU48j/TdHMG5mHIJIRfG7gnRVTFjjD LKAD/pyobqNPxwOGwsuktSV4+oc8ZrHdw5soJL6PAum40aELEQSSJWIFRjUlkOoxokL7 WhtpRZ76TFF1Tk2gquGUuDO1jS7KWh3CmGpzRfWWkjFwa6uc3OIDpyL8tOR5ZpqjbHUr 9Apg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:organization :from:references:to:subject:dkim-signature; bh=P1qJfzyEGRuuV0eDxn3pbmVD8vuajk2myHnjwQFS5/s=; b=Kt4I9XVCBPjbcqNqtDpnKFkFPitLowptQDnTdehKwZz9LhqIjhMvYVcAhS0nr3/4zx uunGrRMlriaxsFCsOTpzVWTpqgneDEKpQPAGMJs+j0Xm7rAQeV/UZO7IrkEyX1cu//WS eCXj6XGJX1PbB8xaN/WD+hLBosC19Gh1UYsf9znhHotJa3Kjj/d8zwo85F/2ztoBe5D4 9CeASbgbhSOgUPiykoPmC73AEc87A2fiZF+WcHgEVG5GtOao+SsYJJCK+t85JtycGqvP 18fCykwnO2sZtUKmg+cOvV7aWAGRb64AZsahXZfbv0caNPNNxwStmmLoj+9DDl+eweAV xvoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=E+xwZUUS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c17si906714jap.11.2021.03.04.16.09.20; Thu, 04 Mar 2021 16:09:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=E+xwZUUS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237694AbhCDJhf (ORCPT + 99 others); Thu, 4 Mar 2021 04:37:35 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:23157 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237673AbhCDJhW (ORCPT ); Thu, 4 Mar 2021 04:37:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1614850556; 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=E+xwZUUSx2KwIqA1crISHXF6y/2MNTqXMvXjgXw0ePI+T51xMt888Yv4ZOOElC1grD4+mJ 1XSWTm0Gj6yFh7oxUfD8jIT9nhx1UpSHHEeGVM7U196oB5zbRM8UXjQkMuYp5UEwyFJQji dVeuYDYhsAkJUpEJV1jEsuBSk9N02Oo= 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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