DPDK usage discussions
 help / color / mirror / Atom feed
From: 洪全 <hongquan@iie.ac.cn>
To: "Stephen Hemminger" <stephen@networkplumber.org>
Cc: users@dpdk.org
Subject: Re: Re: Issue with Cannot allocate memory when using 32-bit DPDK application
Date: Wed, 3 Jul 2024 14:04:23 +0800 (GMT+08:00)	[thread overview]
Message-ID: <5951f96a.841ad.1907731b0dd.Coremail.hongquan@iie.ac.cn> (raw)
In-Reply-To: <20240702224331.497c34aa@hermes.local>

Thank you for your prompt reply.
When I allocated 3 1GB large pages and 128 2MB pages in the system. When I ran it again, the program log output was as follows:

```
EAL: Ask a virtual area of 0x6000 bytes
EAL: Virtual area found at 0xed4a4000 (size = 0x6000)
EAL: Multi-process socket /var/run/dpdk/pmd1/mp_socket
EAL: DPAA Bus not present. Skipping.
EAL: Bus vdev wants IOVA as 'DC'
EAL: Bus pci wants IOVA as 'DC'
EAL: Bus dpaa_bus wants IOVA as 'DC'
EAL: Bus fslmc wants IOVA as 'DC'
EAL: Bus dsa wants IOVA as 'DC'
EAL: Bus auxiliary wants IOVA as 'DC'
EAL: Buses did not request a specific IOVA mode.
EAL: IOMMU is not available, selecting IOVA as PA mode.
EAL: Selected IOVA mode 'PA'
EAL: Probing VFIO support...
EAL: Module /sys/module/vfio not found! error 2 (No such file or directory)
EAL: VFIO modules not loaded, skipping VFIO support...
EAL: Ask a virtual area of 0x2b000 bytes
EAL: Virtual area found at 0xec477000 (size = 0x2b000)
EAL: Setting up physically contiguous memory...
EAL: Setting maximum number of open files to 1048576
EAL: Attempting to preallocate 2048M on socket 0
EAL: Ask a virtual area of 0x1000 bytes
EAL: Virtual area found at 0xee701000 (size = 0x1000)
EAL: Memseg list allocated at socket 0, page size 0x100000kB
EAL: Ask a virtual area of 0x80000000 bytes
EAL: Cannot mmap((nil), 0xc0000000, 0x0, 0x22, -1, 0x0): Cannot allocate memory
EAL: Cannot get a virtual area: Cannot allocate memory
EAL: Cannot allocate VA space for memseg list, retrying with different page size
EAL: Attempting to preallocate 2048M on socket 0
EAL: Ask a virtual area of 0xc000 bytes
EAL: Virtual area found at 0xec46b000 (size = 0xc000)
EAL: Memseg list allocated at socket 0, page size 0x800kB
EAL: Ask a virtual area of 0x80000000 bytes
EAL: Cannot mmap((nil), 0x80200000, 0x0, 0x22, -1, 0x0): Cannot allocate memory
EAL: Cannot get a virtual area: Cannot allocate memory
EAL: Cannot allocate VA space for memseg list, retrying with different page size
EAL: Cannot allocate VA space on socket 0
EAL: FATAL: Cannot init memory
EAL: Cannot init memory
app: main.c:284: main: Assertion `(ret = rte_eal_init(argc, (char **) argv)) &gt;= 0' failed.
Aborted
```

Even if more large pages are allocated, the 32-bit virtual space limit causes mmap to fail.

So does this mean that 32-bit programs cannot use DPDK without disabling large pages?
Is it possible to adjust the 2048M space pre-allocated during DPDK initialization?


&gt; -----原始邮件-----
&gt; 发件人: "Stephen Hemminger" <stephen@networkplumber.org>
&gt; 发送时间: 2024-07-03 13:43:31 (星期三)
&gt; 收件人: "洪全" <hongquan@iie.ac.cn>
&gt; 抄送: users@dpdk.org
&gt; 主题: Re: Issue with Cannot allocate memory when using 32-bit DPDK application
&gt; 
&gt; On Wed, 3 Jul 2024 10:18:34 +0800 (GMT+08:00)
&gt; 洪全 <hongquan@iie.ac.cn> wrote:
&gt; 
&gt; &gt; My CPU architecture is x86-64
&gt; 
&gt; If you have x86 then there is no good reason to bother with 32 bit.
&gt; The lack of virtual space is going to limit you probably to 1Gb or less of huge pages.
</hongquan@iie.ac.cn></hongquan@iie.ac.cn></stephen@networkplumber.org>

      reply	other threads:[~2024-07-03  6:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-02 10:17 洪全
2024-07-02 15:08 ` Stephen Hemminger
2024-07-03  2:18   ` 洪全
2024-07-03  5:43     ` Stephen Hemminger
2024-07-03  6:04       ` 洪全 [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=5951f96a.841ad.1907731b0dd.Coremail.hongquan@iie.ac.cn \
    --to=hongquan@iie.ac.cn \
    --cc=stephen@networkplumber.org \
    --cc=users@dpdk.org \
    /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).