Issue with Cannot allocate memory when using 32-bit DPDK application

洪全 hongquan at iie.ac.cn
Wed Jul 3 08:04:23 CEST 2024


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)) >= 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?


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


More information about the users mailing list