From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id D65A1A0471 for ; Thu, 18 Jul 2019 12:18:25 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A62A01DBF; Thu, 18 Jul 2019 12:18:24 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 233E11DBE for ; Thu, 18 Jul 2019 12:18:22 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Jul 2019 03:18:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,278,1559545200"; d="scan'208";a="158743626" Received: from aburakov-mobl1.ger.corp.intel.com (HELO [10.251.81.9]) ([10.251.81.9]) by orsmga007.jf.intel.com with ESMTP; 18 Jul 2019 03:18:21 -0700 To: Thomas Monjalon Cc: dev@dpdk.org References: <20190718093432.14092-1-thomas@monjalon.net> From: "Burakov, Anatoly" Message-ID: Date: Thu, 18 Jul 2019 11:18:20 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20190718093432.14092-1-thomas@monjalon.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] eal: warn on --no-huge allocation requirement X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 18-Jul-19 10:34 AM, Thomas Monjalon wrote: > When using --no-huge mode, dynamic allocation is not supported. > Because of this limitation, the option --legacy-mem is implied > and -m may be needed to specify the amount of memory to allocate. > Otherwise the default amount MEMSIZE_IF_NO_HUGE_PAGE will be allocated. > > Signed-off-by: Thomas Monjalon > --- > lib/librte_eal/common/eal_common_options.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c > index 512d5088e..4a76929ea 100644 > --- a/lib/librte_eal/common/eal_common_options.c > +++ b/lib/librte_eal/common/eal_common_options.c > @@ -1551,6 +1551,10 @@ eal_check_common_options(struct internal_config *internal_cfg) > "be specified at the same time\n"); > return -1; > } > + if (internal_cfg->no_hugetlbfs && internal_cfg->memory == 0) { > + RTE_LOG(NOTICE, EAL, "Option --"OPT_NO_HUGE" uses legacy mode, " > + "option -m would override default memory allocation\n"); I think this is too technical and misleading. I don't think user cares about legacy vs dynamic mode here. I would rather print out something more informative, like, say, something along those lines: "Option --no-huge was specified in command-line arguments. This mode uses static memory layout and will allocate %dMB of memory by default. Option '-m' can be used to increase allocated memory amount." where %d is the amount of memory we're preallocating. > + } > if (internal_cfg->no_hugetlbfs && internal_cfg->force_sockets == 1) { > RTE_LOG(ERR, EAL, "Option --"OPT_SOCKET_MEM" cannot " > "be specified together with --"OPT_NO_HUGE"\n"); > -- Thanks, Anatoly