DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Burakov, Anatoly" <anatoly.burakov@intel.com>
To: Fengnan Chang <changfengnan@bytedance.com>,
	David Marchand <david.marchand@redhat.com>
Cc: Lin Li <lilintjpu@bytedance.com>, <dev@dpdk.org>
Subject: Re: [External] Re: [PATCH v4] eal: fix eal init may failed when too much continuous memsegs under legacy mode
Date: Mon, 12 Jun 2023 10:48:40 +0100	[thread overview]
Message-ID: <92f02161-eedc-9187-3719-420edf074d80@intel.com> (raw)
In-Reply-To: <CAPFOzZuWDaxb0VpeLxPvcm-q2HwKGAfEqeUHk7Mtu1NiNKAp8Q@mail.gmail.com>

On 6/9/2023 9:35 AM, Fengnan Chang wrote:
> David Marchand <david.marchand@redhat.com> 于2023年6月8日周四 04:33写道:
>>
>> On Mon, May 29, 2023 at 1:23 PM Fengnan Chang
>> <changfengnan@bytedance.com> 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.
>>> Fix this by make remap_segment return how many segments mapped,
>>> remap_segment try to map most contiguous segments it can, if
>>> exceed it's capbility, remap_needed_hugepages will continue to
>>> map other left pages.
>>>
>>> For example:
>>> hugepage configure:
>>> cat /sys/devices/system/node/node*/hugepages/hugepages-2048kB/nr_hugepages
>>> 10241
>>> 10239
>>>
>>> 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.
>>> EAL: Couldn't remap hugepage files into memseg lists
>>> EAL: FATAL: Cannot init memory
>>> EAL: Cannot init memory
>>
>> We are missing a Fixes: tag and this is backport material, right?
> Yes, this patch need cc stable@dpdk.org
>>
>>
>>>
>>> Signed-off-by: Fengnan Chang <changfengnan@bytedance.com>
>>> Signed-off-by: Lin Li <lilintjpu@bytedance.com>
>>
>> Can I update Lin Li existing entry in .mailmap? Or is this a different person?
> Please help update in .mailmap, same person, thanks.
>>
>>
>>> Signed-off-by: Burakov Anatoly <anatoly.burakov@intel.com>
>> Anatoly Burakov*
>>
>>> Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
>>
>> Strange to have both SoB and Review tag from Anatoly.
> Maybe just leave SoB ? cc @ Anatoly

The signoff is there because I suggested an alternative implementation 
in comments. I'm OK with just leaving Review :)

>>
>>
>>> ---
>>>   lib/eal/linux/eal_memory.c | 51 +++++++++++++++++++++++++++-----------
>>
>> Is this issue affecting only Linux?
> Yes,Windows and FreeBSD is fine.
>>
>>
>>
>> --
>> David Marchand
>>

-- 
Thanks,
Anatoly


  reply	other threads:[~2023-06-12  9:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-29 11:21 Fengnan Chang
2023-06-07 20:32 ` David Marchand
2023-06-09  8:35   ` [External] " Fengnan Chang
2023-06-12  9:48     ` Burakov, Anatoly [this message]
2023-06-12  9:55       ` David Marchand
2023-06-09 12:57 ` David Marchand

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=92f02161-eedc-9187-3719-420edf074d80@intel.com \
    --to=anatoly.burakov@intel.com \
    --cc=changfengnan@bytedance.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=lilintjpu@bytedance.com \
    /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).