DPDK patches and discussions
 help / color / mirror / Atom feed
From: "De Lara Guarch, Pablo" <pablo.de.lara.guarch@intel.com>
To: Shreyansh Jain <shreyansh.jain@nxp.com>,
	Akhil Goyal <akhil.goyal@nxp.com>
Cc: "Doherty, Declan" <declan.doherty@intel.com>,
	"Trahe, Fiona" <fiona.trahe@intel.com>,
	"Jain, Deepak K" <deepak.k.jain@intel.com>,
	"Griffin, John" <john.griffin@intel.com>,
	"jerin.jacob@caviumnetworks.com" <jerin.jacob@caviumnetworks.com>,
	"hemant.agrawal@nxp.com" <hemant.agrawal@nxp.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH 6/6] app/crypto-perf: use single mempool
Date: Mon, 11 Sep 2017 13:56:54 +0000	[thread overview]
Message-ID: <E115CCD9D858EF4F90C690B0DCB4D8976CC1AB10@IRSMSX108.ger.corp.intel.com> (raw)
In-Reply-To: <a3db25c2-3bc6-076c-6c80-fc3ecfb1496c@nxp.com>



> -----Original Message-----
> From: Shreyansh Jain [mailto:shreyansh.jain@nxp.com]
> Sent: Monday, September 11, 2017 2:11 PM
> To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>; Akhil Goyal
> <akhil.goyal@nxp.com>
> Cc: Doherty, Declan <declan.doherty@intel.com>; Trahe, Fiona
> <fiona.trahe@intel.com>; Jain, Deepak K <deepak.k.jain@intel.com>;
> Griffin, John <john.griffin@intel.com>; jerin.jacob@caviumnetworks.com;
> hemant.agrawal@nxp.com; dev@dpdk.org
> Subject: Re: [PATCH 6/6] app/crypto-perf: use single mempool
> 
> Hello Pablo,
> 
> I have a comment inline:
> 
> On Monday 11 September 2017 04:38 PM, De Lara Guarch, Pablo wrote:
> >> -----Original Message-----
> >> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Akhil Goyal
> >> Sent: Wednesday, August 30, 2017 9:31 AM
> >> To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>; Doherty,
> >> Declan <declan.doherty@intel.com>; Trahe, Fiona
> >> <fiona.trahe@intel.com>; Jain, Deepak K <deepak.k.jain@intel.com>;
> >> Griffin, John <john.griffin@intel.com>;
> >> jerin.jacob@caviumnetworks.com; hemant.agrawal@nxp.com
> >> Cc: dev@dpdk.org
> >> Subject: Re: [dpdk-dev] [PATCH 6/6] app/crypto-perf: use single
> >> mempool
> >>
> >> Hi Pablo,
> >> On 8/18/2017 1:35 PM, Pablo de Lara wrote:
> >>> In order to improve memory utilization, a single mempool is created,
> >>> containing the crypto operation and mbufs (one if operation is
> >>> in-place, two if out-of-place).
> >>> This way, a single object is allocated and freed per operation,
> >>> reducing the amount of memory in cache, which improves scalability.
> >>>
> >>> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> >>> ---
> >>>    app/test-crypto-perf/cperf_ops.c             |  96 ++++++--
> >>>    app/test-crypto-perf/cperf_ops.h             |   2 +-
> >>>    app/test-crypto-perf/cperf_test_latency.c    | 350 ++++++++++++-----
> --
> > ---
> >> ----
> >>>    app/test-crypto-perf/cperf_test_throughput.c | 347
> >>> ++++++++++++------
> >> --------
> >>>    app/test-crypto-perf/cperf_test_verify.c     | 356 ++++++++++++-------
> -
> > ---
> >> ----
> >>>    5 files changed, 553 insertions(+), 598 deletions(-)
> >>>
> >> NACK.
> >> This patch replaces rte_pktmbuf_pool_create with the
> >> rte_mempool_create for mbufs, which is not a preferred way to
> >> allocate
> > memory for pktmbuf.
> >>
> >> Any example/test application in DPDK should not be using this, as
> >> this kind of usages will  not be compatible for all dpdk drivers in general.
> >>
> >> This kind of usages of rte_mempool_create will not work for any
> >> devices using hw offloaded memory pools for pktmbuf.
> >> one such example is dpaa2.
> >
> > Hi Akhil,
> >
> > Sorry for the delay on this reply and thanks for the review.
> >
> > I think, since we are not getting the buffers from the NIC, but we are
> > allocating them ourselves, it is not strictly required to call
> rte_pktmbuf_pool_create.
> > In the end, we only need them for memory for the crypto PMDs and we
> > are not touching anything in them, so I think using calling
> rte_mempool_create should work ok.
> > Having a single mempool would be way more performant and would
> avoid
> > the scalability issues that we are having in this application now, and
> > knowing that this application was created to test crypto PMD
> performance, I think it is worth trying this out.
> >
> > What is it exactly needed for dpaa2? Is the mempool handler?
> 
> If I recall correctly:
> This is the call flow when rte_pktmbuf_pool_create is called:
>   - rte_pktmbuf_pool_create
>     `-> rte_mempool_create_empty
>         `-> allocate and fill mempool object with defaults
>     `-> rte_mempool_set_ops_byname
>         `-> sets mempool handler to RTE_MBUF_DEFAULT_MEMPOOL_OPS
>     `-> rte_mempool_populate_default
>         `-> calls pool handler specific enqueue/dequeue
> 
> but that of rte_mempool_create is:
>   - rte_mempool_create
>     `-> rte_mempool_create_empty
>         `-> allocate and fill mempool object with defaults
>     `-> rte_mempool_set_ops_byname
>         `-> set to one of ring_*_*
>             No check/logic for configuration defined handler
>             like RTE_MBUF_DEFAULT_MEMPOOL_OPS
>     `-> rte_mempool_populate_default
>         `-> calls ring* handler specific enqueue/dequeue
> 
> Calling rte_mempool_create bypasses the check for any mempool handler
> configured through the build system.
> 
> > Would it work for you if I create the mempool in a similar way as what
> > rte_pktmbuf_pool_create is doing? Calling
> rte_mempool_set_ops_byname?
> 
> Yes, but that would mean using the combination of
> rte_mempool_create_empty and rte_mempool_set_ops_byname which,
> eventually, would be equal to using rte_pktmbuf_pool_create.
> 
> rte_mempool_set_ops_byname over a mempool created by
> rte_mempool_create would mean changing the enqueue/dequeue
> operations *after* the mempool has been populated. That would be
> incorrect.
> 
> I am not sure of what the intent it - whether these buffers should be
> allowed to be offloaded to hardware. If yes, then rte_mempool_create
> wouldn't help.

Ok, got it. I think I would go for the option of imitating what rte_pktmbuf_pool_create,
but adding the flexibility of having a crypto operation and mbuf, instead of just the mbuf.

Thanks for the input.
Pablo

> 
> >
> > Thanks!
> > Pablo
> >
> >
> >>
> >> -Akhil


  reply	other threads:[~2017-09-11 13:56 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-18  8:05 [dpdk-dev] [PATCH 0/6] Crypto-perf app improvements Pablo de Lara
2017-08-18  8:05 ` [dpdk-dev] [PATCH 1/6] app/crypto-perf: set AAD after the crypto operation Pablo de Lara
2017-08-18  8:05 ` [dpdk-dev] [PATCH 2/6] app/crypto-perf: parse AEAD data from vectors Pablo de Lara
2017-08-18  8:05 ` [dpdk-dev] [PATCH 3/6] app/crypto-perf: parse segment size Pablo de Lara
2017-08-18  8:05 ` [dpdk-dev] [PATCH 4/6] app/crypto-perf: overwrite mbuf when verifying Pablo de Lara
2017-08-18  8:05 ` [dpdk-dev] [PATCH 5/6] app/crypto-perf: do not populate the mbufs at init Pablo de Lara
2017-08-18  8:05 ` [dpdk-dev] [PATCH 6/6] app/crypto-perf: use single mempool Pablo de Lara
2017-08-30  8:30   ` Akhil Goyal
     [not found]     ` <9F7182E3F746AB4EA17801C148F3C60433039119@IRSMSX101.ger.corp.intel.com>
2017-09-11 11:08       ` De Lara Guarch, Pablo
2017-09-11 13:10         ` Shreyansh Jain
2017-09-11 13:56           ` De Lara Guarch, Pablo [this message]
2017-09-04 13:08 ` [dpdk-dev] [PATCH 0/6] Crypto-perf app improvements Zhang, Roy Fan
2017-09-13  7:20 ` [dpdk-dev] [PATCH v2 0/7] " Pablo de Lara
2017-09-13  7:20   ` [dpdk-dev] [PATCH v2 1/7] app/crypto-perf: set AAD after the crypto operation Pablo de Lara
2017-09-13  7:20   ` [dpdk-dev] [PATCH v2 2/7] app/crypto-perf: parse AEAD data from vectors Pablo de Lara
2017-09-13  7:20   ` [dpdk-dev] [PATCH v2 3/7] app/crypto-perf: parse segment size Pablo de Lara
2017-09-13  7:20   ` [dpdk-dev] [PATCH v2 4/7] app/crypto-perf: overwrite mbuf when verifying Pablo de Lara
2017-09-13  7:20   ` [dpdk-dev] [PATCH v2 5/7] app/crypto-perf: do not populate the mbufs at init Pablo de Lara
2017-09-22  7:55   ` [dpdk-dev] [PATCH v3 0/7] Crypto-perf app improvements Pablo de Lara
2017-09-22  7:55     ` [dpdk-dev] [PATCH v3 1/7] app/crypto-perf: set AAD after the crypto operation Pablo de Lara
2017-09-22  7:55     ` [dpdk-dev] [PATCH v3 2/7] app/crypto-perf: parse AEAD data from vectors Pablo de Lara
2017-09-22  7:55     ` [dpdk-dev] [PATCH v3 3/7] app/crypto-perf: parse segment size Pablo de Lara
2017-09-22  7:55     ` [dpdk-dev] [PATCH v3 4/7] app/crypto-perf: overwrite mbuf when verifying Pablo de Lara
2017-09-22  7:55     ` [dpdk-dev] [PATCH v3 5/7] app/crypto-perf: do not populate the mbufs at init Pablo de Lara
2017-09-22  7:55     ` [dpdk-dev] [PATCH v3 6/7] app/crypto-perf: support multiple queue pairs Pablo de Lara
2017-09-26  8:42       ` Akhil Goyal
2017-10-04 10:25         ` De Lara Guarch, Pablo
2017-09-22  7:55     ` [dpdk-dev] [PATCH v3 7/7] app/crypto-perf: use single mempool Pablo de Lara
2017-09-26  9:21       ` Akhil Goyal
2017-10-04  7:47         ` De Lara Guarch, Pablo
2017-10-04  3:46     ` [dpdk-dev] [PATCH v4 0/8] Crypto-perf app improvements Pablo de Lara
2017-10-04  3:46       ` [dpdk-dev] [PATCH v4 1/8] app/crypto-perf: refactor common test code Pablo de Lara
2017-10-04  3:46       ` [dpdk-dev] [PATCH v4 2/8] app/crypto-perf: set AAD after the crypto operation Pablo de Lara
2017-10-04  3:46       ` [dpdk-dev] [PATCH v4 3/8] app/crypto-perf: parse AEAD data from vectors Pablo de Lara
2017-10-04  3:46       ` [dpdk-dev] [PATCH v4 4/8] app/crypto-perf: parse segment size Pablo de Lara
2017-10-04  3:46       ` [dpdk-dev] [PATCH v4 5/8] app/crypto-perf: overwrite mbuf when verifying Pablo de Lara
2017-10-04  3:46       ` [dpdk-dev] [PATCH v4 6/8] app/crypto-perf: do not populate the mbufs at init Pablo de Lara
2017-10-04  3:46       ` [dpdk-dev] [PATCH v4 7/8] app/crypto-perf: support multiple queue pairs Pablo de Lara
2017-10-04  3:46       ` [dpdk-dev] [PATCH v4 8/8] app/crypto-perf: use single mempool Pablo de Lara
2017-10-06 11:57       ` [dpdk-dev] [PATCH v4 0/8] Crypto-perf app improvements Akhil Goyal
2017-10-06 12:50       ` De Lara Guarch, Pablo
2017-09-13  7:22 ` [dpdk-dev] [PATCH v2 0/7] " Pablo de Lara
2017-09-13  7:22   ` [dpdk-dev] [PATCH v2 1/7] app/crypto-perf: set AAD after the crypto operation Pablo de Lara
2017-09-13  7:22   ` [dpdk-dev] [PATCH v2 2/7] app/crypto-perf: parse AEAD data from vectors Pablo de Lara
2017-09-13  7:22   ` [dpdk-dev] [PATCH v2 3/7] app/crypto-perf: parse segment size Pablo de Lara
2017-09-13  7:22   ` [dpdk-dev] [PATCH v2 4/7] app/crypto-perf: overwrite mbuf when verifying Pablo de Lara
2017-09-13  7:22   ` [dpdk-dev] [PATCH v2 5/7] app/crypto-perf: do not populate the mbufs at init Pablo de Lara
2017-09-13  7:22   ` [dpdk-dev] [PATCH v2 6/7] app/crypto-perf: support multiple queue pairs Pablo de Lara
2017-09-13  7:22   ` [dpdk-dev] [PATCH v2 7/7] app/crypto-perf: use single mempool Pablo de Lara

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=E115CCD9D858EF4F90C690B0DCB4D8976CC1AB10@IRSMSX108.ger.corp.intel.com \
    --to=pablo.de.lara.guarch@intel.com \
    --cc=akhil.goyal@nxp.com \
    --cc=declan.doherty@intel.com \
    --cc=deepak.k.jain@intel.com \
    --cc=dev@dpdk.org \
    --cc=fiona.trahe@intel.com \
    --cc=hemant.agrawal@nxp.com \
    --cc=jerin.jacob@caviumnetworks.com \
    --cc=john.griffin@intel.com \
    --cc=shreyansh.jain@nxp.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).