All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Burakov, Anatoly" <anatoly.burakov@intel.com>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] eal: warn on --no-huge allocation requirement
Date: Thu, 18 Jul 2019 11:37:51 +0100	[thread overview]
Message-ID: <084acfdb-27b2-0f45-bffe-3bd5701a52ba@intel.com> (raw)
In-Reply-To: <1723860.jq7rjiM1Jy@xps>

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 <thomas@monjalon.net>
>>> ---
>>>    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

  reply	other threads:[~2019-07-18 10:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-18  9:34 [dpdk-dev] [PATCH] eal: warn on --no-huge allocation requirement Thomas Monjalon
2019-07-18 10:18 ` Burakov, Anatoly
2019-07-18 10:29   ` Thomas Monjalon
2019-07-18 10:37     ` Burakov, Anatoly [this message]
2019-07-22 16:55 ` [dpdk-dev] [PATCH v2] eal: warn on legacy memory " Thomas Monjalon
2019-07-22 17:03   ` Thomas Monjalon
2019-07-23  9:10     ` Burakov, Anatoly
2019-07-30 17:21 ` [dpdk-dev] [PATCH v3] " Thomas Monjalon
2019-07-31  9:15   ` Burakov, Anatoly
2019-08-05  9:46     ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=084acfdb-27b2-0f45-bffe-3bd5701a52ba@intel.com \
    --to=anatoly.burakov@intel.com \
    --cc=dev@dpdk.org \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.