strange DPDK memory allocator behavior
Thomas Monjalon
thomas at monjalon.net
Fri Nov 8 16:03:33 CET 2024
Hello,
After merging the lcore variables allocation from Mattias,
we've seen an issue in unit tests running on 32-bit plaftorms:
https://build.opensuse.org/package/live_build_log/home:bluca:dpdk/dpdk/Debian_Testing/i586
The initialization has this error message "most of the time":
EAL: Cannot get a virtual area: Cannot allocate memory
David did more tests with this command:
# (for i in $(seq 10); do echo | LD_LIBRARY_PATH=lib:drivers app/dpdk-test --no-huge -m 2048 -d drivers; done) |& grep 'Cannot get a virtual area: Cannot allocate memory'
EAL: Cannot get a virtual area: Cannot allocate memory
EAL: Cannot get a virtual area: Cannot allocate memory
EAL: Cannot get a virtual area: Cannot allocate memory
There are 2 interesting findings:
- the issue disappears when changing allocation size 2048
to more (4096) or less (1024)
- the issue disappears when removing some big static arrays from unit tests
like "sarray_lcore_state" in test_lcore_var_perf.c
Should we avoid having such big arrays in our unit tests?
I don't understand how "-m 2048" is impacted by the static allocations.
And I wonder how it could impact memory fragmentation
so 2048 MB cannot be allocated but more or less are working fine.
It looks like an issue in the DPDK allocator.
Note that we are using --no-huge for these tests.
Any ideas?
More information about the dev
mailing list