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 E20F4A0471 for ; Thu, 18 Jul 2019 12:29:46 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B8BE51DBE; Thu, 18 Jul 2019 12:29:46 +0200 (CEST) Received: from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com [64.147.123.19]) by dpdk.org (Postfix) with ESMTP id A164514E8 for ; Thu, 18 Jul 2019 12:29:44 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id B499E437; Thu, 18 Jul 2019 06:29:43 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Thu, 18 Jul 2019 06:29:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=mesmtp; bh=BYIQxqYABrf41ParFZjox5y/uC8/StCTPTZfpI4DHf0=; b=W8k5z4ceLtU+ bxwaetN/IlMXRdZYp1ds+mZTmKBY/biGGQFQw2g1G6Z3CARmVlccscc5lH5vcqF+ Og/DSBgetqMACkVZEBeIcDFIu//pJlU67E4TXgQMWdV7h9sHyDYJ3aWNNjTEfMFg g4y6K75hesTGk+fFVesPWoutTA5vbVM= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=BYIQxqYABrf41ParFZjox5y/uC8/StCTPTZfpI4DH f0=; b=u02nAOGEnoHsXBfgXyV/YD3c7vNT2FCf+do/QDUSxhrer+mEBRhfORJos 3CPUNMiLccaQ3uQxVgX0pv5pbD78Ul+VL1PvWZZc8fLrR3DjFao30nVAYk0yVFHF GX8FM/re2n2+9VVlNOjsq+4mXIZBA27R9huRLVbYSLknZCkh1/LAeKqKkYJ97YHx nRM1qZdPgbW/l1s/rPeVR7n53jPJkq2J2LN3HXdGm7OYGl68sHksCz6SXehL3xDk qCD4llHu7y5pWF+syO29kBytD9O9o4dEefHnPSRZ1XFLfAx9dfAf2ipJVtTtD7Pb x9NbjjaX9K1L8CQYWAU9QwDS5M8JA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrieehgdeftdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucfkph epjeejrddufeegrddvtdefrddukeegnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhho mhgrshesmhhonhhjrghlohhnrdhnvghtnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 8081780065; Thu, 18 Jul 2019 06:29:42 -0400 (EDT) From: Thomas Monjalon To: "Burakov, Anatoly" Cc: dev@dpdk.org Date: Thu, 18 Jul 2019 12:29:38 +0200 Message-ID: <1723860.jq7rjiM1Jy@xps> In-Reply-To: References: <20190718093432.14092-1-thomas@monjalon.net> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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" 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 :)