Go to file
Olivier Matz 3a3d0c75b4 mempool: fix slow allocation of large pools
When allocating a mempool which is larger than the largest
available area, it can take a lot of time:

a- the mempool calculate the required memory size, and tries
   to allocate it, it fails
b- then it tries to allocate the largest available area (this
   does not request new huge pages)
c- add this zone to the mempool, this triggers the allocation
   of a mem hdr, which request a new huge page
d- back to a- until mempool is populated or until there is no
   more memory

This can take a lot of time to finally fail (several minutes): in step
a- it takes all available hugepages on the system, then release them
after it fails.

The problem appeared with commit eba11e3646 ("mempool: reduce wasted
space on populate"), because smaller chunks are now allowed. Previously,
it had to be at least one page size, which is not the case in step b-.

To fix this, implement our own way to allocate the largest available
area instead of using the feature from memzone: if an allocation fails,
try to divide the size by 2 and retry. When the requested size falls
below min_chunk_size, stop and return an error.

Fixes: eba11e3646 ("mempool: reduce wasted space on populate")
Cc: stable@dpdk.org

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
Tested-by: Ali Alnubani <alialnu@mellanox.com>
2020-01-20 12:12:20 +01:00
.ci ci: add travis ci support for native aarch64 2020-01-14 09:45:23 +01:00
app app/testpmd: add flow dump command 2020-01-17 19:59:19 +01:00
buildtools doc: rebuild with meson whenever a file changes 2020-01-15 08:50:28 +01:00
config raw/octeontx2_ep: add build infra and device probe 2020-01-20 09:04:39 +01:00
devtools devtools: add path to additional shared object files 2020-01-14 09:45:23 +01:00
doc doc: fix igb_uio parameter in ntb guide 2020-01-20 10:14:03 +01:00
drivers raw/octeontx2_ep: fix shared library 2020-01-20 12:12:14 +01:00
examples examples/ntb: fix mempool ops setting 2020-01-20 10:39:06 +01:00
kernel kni: rename variable with namespace prefix 2020-01-20 00:25:45 +01:00
lib mempool: fix slow allocation of large pools 2020-01-20 12:12:20 +01:00
license remove blank lines at end of file 2019-11-26 00:12:08 +01:00
mk raw/octeontx2_ep: add build infra and device probe 2020-01-20 09:04:39 +01:00
usertools usertools: fix typo in SPDX tag of telemetry script 2019-11-28 03:12:55 +01:00
.gitattributes improve git diff 2016-11-13 15:25:12 +01:00
.gitignore doc: add vDPA features table 2020-01-14 00:09:33 +01:00
.travis.yml ci: switch to Ubuntu 18.04 in Travis 2020-01-19 19:22:41 +01:00
ABI_VERSION build: fix soname info for 19.11 compatibility 2019-12-19 16:18:21 +01:00
GNUmakefile test: move to app directory 2019-02-26 15:29:27 +01:00
MAINTAINERS raw/octeontx2_ep: add build infra and device probe 2020-01-20 09:04:39 +01:00
Makefile remove blank lines at end of file 2019-11-26 00:12:08 +01:00
meson_options.txt build: change ABI versioning to global 2019-11-20 23:05:39 +01:00
meson.build build: fix Windows build 2019-11-25 15:07:02 +01:00
README license: introduce SPDX identifiers 2018-01-04 22:41:38 +01:00
VERSION version: 20.02-rc0 2019-12-02 17:59:49 +01:00

DPDK is a set of libraries and drivers for fast packet processing.
It supports many processor architectures and both FreeBSD and Linux.

The DPDK uses the Open Source BSD-3-Clause license for the core libraries
and drivers. The kernel components are GPL-2.0 licensed.

Please check the doc directory for release notes,
API documentation, and sample application information.

For questions and usage discussions, subscribe to: users@dpdk.org
Report bugs and issues to the development mailing list: dev@dpdk.org