From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Rybchenko Subject: Re: [PATCH v4 04/11] mempool: add op to calculate memory size to be allocated Date: Mon, 16 Apr 2018 18:41:14 +0300 Message-ID: <59fd3f55-d69b-6749-1679-3c76ddad33e0@solarflare.com> References: <1511539591-20966-1-git-send-email-arybchenko@solarflare.com> <1523885080-17168-1-git-send-email-arybchenko@solarflare.com> <1523885080-17168-5-git-send-email-arybchenko@solarflare.com> <20180416153341.pko6s2xxzb6nv6m6@platinum> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Cc: , Anatoly Burakov To: Olivier Matz Return-path: Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [148.163.129.52]) by dpdk.org (Postfix) with ESMTP id 38442AADE for ; Mon, 16 Apr 2018 17:41:24 +0200 (CEST) In-Reply-To: <20180416153341.pko6s2xxzb6nv6m6@platinum> Content-Language: en-GB List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 04/16/2018 06:33 PM, Olivier Matz wrote: > On Mon, Apr 16, 2018 at 02:24:33PM +0100, Andrew Rybchenko wrote: >> Size of memory chunk required to populate mempool objects depends >> on how objects are stored in the memory. Different mempool drivers >> may have different requirements and a new operation allows to >> calculate memory size in accordance with driver requirements and >> advertise requirements on minimum memory chunk size and alignment >> in a generic way. >> >> Bump ABI version since the patch breaks it. >> >> Suggested-by: Olivier Matz >> Signed-off-by: Andrew Rybchenko > [...] > >> @@ -643,39 +633,35 @@ rte_mempool_populate_default(struct rte_mempool *mp) >> * 1G page on a 10MB memzone). If we fail to get enough contiguous >> * memory, then we'll go and reserve space page-by-page. >> */ >> - no_pageshift = no_contig || force_contig || >> - rte_eal_iova_mode() == RTE_IOVA_VA; >> + no_pageshift = no_contig || rte_eal_iova_mode() == RTE_IOVA_VA; >> try_contig = !no_contig && !no_pageshift && rte_eal_has_hugepages(); > In case there is a v5 for another reason, I think the last line is > equivalent to: > > try_contig = !no_pageshift && rte_eal_has_hugepages(); Agree. As I understand it is true before my patch as well. > Otherwise: > Acked-by: Olivier Matz