DPDK patches and discussions
 help / color / mirror / Atom feed
From: Hemant Agrawal <hemant.agrawal@nxp.com>
To: Olivier MATZ <olivier.matz@6wind.com>
Cc: <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH 1/2] mempool: indicate the usages of multi memzones
Date: Fri, 22 Dec 2017 21:48:01 +0530	[thread overview]
Message-ID: <cb5b8b31-67ec-3258-c554-085f69f21059@nxp.com> (raw)
In-Reply-To: <20171222135929.ei35n7gs55u3jqvr@platinum>

On 12/22/2017 7:29 PM, Olivier MATZ wrote:
> On Wed, Dec 20, 2017 at 05:29:59PM +0530, Hemant Agrawal wrote:
>> On 12/19/2017 6:38 PM, Hemant Agrawal wrote:
>>>
>>>> That's true, I commented too fast :)
>>>> And what about using mp->nb_mem_chunks instead? Would it do the job
>>>> in your use-case?
>>>
>>> It should work.  Let me check it out.
>>
>> There is a slight problem with nb_mem_chunks.
>>
>> It is getting incremented in the end of "rte_mempool_populate_phys",
>> while the elements are getting populated before it in the call of
>> mempool_add_elem.
>>
>> I can use nb_mem_chunks are '0' check. However it can break in future if
>> mempool_populate_phys changes.
>
> Sorry, I'm not sure I'm getting what you say.
>
> My question was about using mp->nb_mem_chunks instead of a new flag in the
> dppa driver. Am I missing something?
>

mp->nb_mem_chunks gets finalized when the mempool is fully created. It's 
value is transient before that i.e. it will keep on changing on the 
every call to rte_mempool_populate_phys.

However, we need this information on the very first element allocation. 
So, nb_mem_chunks will not work.

  reply	other threads:[~2017-12-22 16:19 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-06 12:31 Hemant Agrawal
2017-12-06 12:31 ` [dpdk-dev] [PATCH 2/2] mempool/dpaa: optimize phy to virt conversion Hemant Agrawal
2017-12-19 10:24 ` [dpdk-dev] [PATCH 1/2] mempool: indicate the usages of multi memzones Olivier MATZ
2017-12-19 10:46   ` Hemant Agrawal
2017-12-19 11:02     ` Olivier MATZ
2017-12-19 13:08       ` Hemant Agrawal
2017-12-20 11:59         ` Hemant Agrawal
2017-12-22 13:59           ` Olivier MATZ
2017-12-22 16:18             ` Hemant Agrawal [this message]
2018-01-16 13:51               ` Olivier Matz
2018-01-17  7:49                 ` Hemant Agrawal
2018-01-05 10:52       ` santosh
2018-01-17  8:51 ` [dpdk-dev] [PATCH v2] mempool/dpaa: optimize phy to virt conversion Hemant Agrawal
2018-01-18 23:28   ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cb5b8b31-67ec-3258-c554-085f69f21059@nxp.com \
    --to=hemant.agrawal@nxp.com \
    --cc=dev@dpdk.org \
    --cc=olivier.matz@6wind.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).