[dpdk-dev] [PATCH v6 24/70] mempool: add support for the new allocation methods

Olivier Matz olivier.matz at 6wind.com
Wed Apr 11 16:35:34 CEST 2018


On Wed, Apr 11, 2018 at 01:29:59PM +0100, Anatoly Burakov wrote:
> If a user has specified that the zone should have contiguous memory,
> use the new _contig allocation API's instead of normal ones.
> 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 at intel.com>
> Tested-by: Santosh Shukla <santosh.shukla at caviumnetworks.com>
> Tested-by: Hemant Agrawal <hemant.agrawal at nxp.com>
> Tested-by: Gowrishankar Muthukrishnan <gowrishankar.m at linux.vnet.ibm.com>

Acked-by: Olivier Matz <olivier.matz at 6wind.com>


More information about the dev mailing list