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 045F3A0471 for ; Thu, 18 Jul 2019 12:37:57 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 59A951DBF; Thu, 18 Jul 2019 12:37:56 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id E4A591D9E for ; Thu, 18 Jul 2019 12:37:53 +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 orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Jul 2019 03:37:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,278,1559545200"; d="scan'208";a="158746848" 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:37:52 -0700 To: Thomas Monjalon Cc: dev@dpdk.org References: <20190718093432.14092-1-thomas@monjalon.net> <1723860.jq7rjiM1Jy@xps> From: "Burakov, Anatoly" Message-ID: <084acfdb-27b2-0f45-bffe-3bd5701a52ba@intel.com> Date: Thu, 18 Jul 2019 11:37:51 +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: <1723860.jq7rjiM1Jy@xps> 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 11:29 AM, Thomas Monjalon wrote: > 18/07/2019 12:18, Burakov, Anatoly: >> 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. > > %d is defined in eal.c > It requires to move the value in a common .h > > I may try something like you suggest in shorter. > A log is supposed to be short :) > OK, maybe not print the value and make it shorter, but definitely don't confuse the user with talk about legacy modes :) -- Thanks, Anatoly