numam-dpdk/lib/librte_mempool
Anatoly Burakov ba0009560c mempool: support new allocation methods
If a user has specified that the zone should have contiguous memory,
add a memzone flag to request contiguous memory. Otherwise, account
for the fact that unless we're in IOVA_AS_VA mode, we cannot
guarantee that the pages would be physically contiguous, so we
calculate the memzone size and alignments as if we were getting
the smallest page size available.

However, for the non-IOVA contiguous case, existing mempool size
calculation function doesn't give us expected results, because it
will return memzone sizes aligned to page size (e.g. a 1MB mempool
may use an entire 1GB page), therefore in cases where we weren't
specifically asked to reserve non-contiguous memory, first try
reserving a memzone as IOVA-contiguous, and if that fails, then
try reserving with page-aligned size/alignment.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Tested-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Tested-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Tested-by: Gowrishankar Muthukrishnan <gowrishankar.m@linux.vnet.ibm.com>
2018-04-11 19:45:48 +02:00
..
Makefile lib: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
meson.build mempool: fix library version in meson build 2018-03-28 00:07:35 +02:00
rte_mempool_ops.c mempool: use SPDX tags 2018-02-01 02:27:22 +01:00
rte_mempool_version.map mempool: rename populate functions to IOVA 2017-11-06 22:26:34 +01:00
rte_mempool.c mempool: support new allocation methods 2018-04-11 19:45:48 +02:00
rte_mempool.h mempool: use SPDX tags 2018-02-01 02:27:22 +01:00