DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Burakov, Anatoly" <anatoly.burakov@intel.com>
To: Fengnan Chang <changfengnan@bytedance.com>,
	Thomas Monjalon <thomas@monjalon.net>
Cc: <dev@dpdk.org>, Lin Li <lilintjpu@bytedance.com>
Subject: Re: [External] Re: [PATCH] eal: fix eal init may failed when too much continuous memsegs under legacy mode
Date: Mon, 22 May 2023 13:43:37 +0100	[thread overview]
Message-ID: <ac9ae6b9-0432-30e0-5ee5-dfeab9424469@intel.com> (raw)
In-Reply-To: <CAPFOzZvcwkbG42ymdNEZ+CToy6RhpkyOow5gsBF5eq8Q0dOZPw@mail.gmail.com>

On 5/22/2023 1:09 PM, Fengnan Chang wrote:
> Burakov, Anatoly <anatoly.burakov@intel.com> 于2023年5月20日周六 23:03写道:
>>
>> Hi,
>>
>> On 5/16/2023 1:21 PM, Fengnan Chang wrote:
>>> Under legacy mode, if the number of continuous memsegs greater
>>> than RTE_MAX_MEMSEG_PER_LIST, eal init will failed even though
>>> another memseg list is empty, because only one memseg list used
>>> to check in remap_needed_hugepages.
>>>
>>> For example:
>>> hugepage configure:
>>> 20480
>>> 13370
>>> 7110
>>>
>>> startup log:
>>> EAL: Detected memory type: socket_id:0 hugepage_sz:2097152
>>> EAL: Detected memory type: socket_id:1 hugepage_sz:2097152
>>> EAL: Creating 4 segment lists: n_segs:8192 socket_id:0 hugepage_sz:2097152
>>> EAL: Creating 4 segment lists: n_segs:8192 socket_id:1 hugepage_sz:2097152
>>> EAL: Requesting 13370 pages of size 2MB from socket 0
>>> EAL: Requesting 7110 pages of size 2MB from socket 1
>>> EAL: Attempting to map 14220M on socket 1
>>> EAL: Allocated 14220M on socket 1
>>> EAL: Attempting to map 26740M on socket 0
>>> EAL: Could not find space for memseg. Please increase 32768 and/or 65536 in
>>> configuration.
>>
>> Unrelated, but this is probably a wrong message, this should've called
>> out the config options to change, not their values. Sounds like a log
>> message needs fixing somewhere...
> 
> In the older version, the log is:
> EAL: Could not find space for memseg. Please increase
> CONFIG_RTE_MAX_MEMSEG_PER_TYPE and/or CONFIG_RTE_MAX_MEM_PER_TYPE in
> configuration.
> Maybe it's better ?
> 

It was better indeed, but this seems to have to do with the fact that 
RTE_STR doesn't treat valid macros like a string, it expands them.

So, e.g. `RTE_STR(INVALID_MACRO)` gets translated to `INVALID_MACRO` 
string, while `RTE_STR(RTE_MAX_LCORE)` gets translated to whatever 
actual value `RTE_MAX_LCORE` has (128 in my case).

Using `_RTE_STR` in place of `RTE_STR` fixes the issue, but i'm not sure 
if it's the right solution, as `_RTE_STR` is prefixed with an 
underscore, which implies it's not to be used directly.

+Thomas thoughts?
-- 
Thanks,
Anatoly


      reply	other threads:[~2023-05-22 12:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-16 12:21 Fengnan Chang
2023-05-20 15:03 ` Burakov, Anatoly
2023-05-22 12:09   ` [External] " Fengnan Chang
2023-05-22 12:43     ` Burakov, Anatoly [this message]

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=ac9ae6b9-0432-30e0-5ee5-dfeab9424469@intel.com \
    --to=anatoly.burakov@intel.com \
    --cc=changfengnan@bytedance.com \
    --cc=dev@dpdk.org \
    --cc=lilintjpu@bytedance.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).