DPDK usage discussions
 help / color / mirror / Atom feed
From: "Trahe, Fiona" <fiona.trahe@intel.com>
To: Changchun Zhang <changchun.zhang@oracle.com>,
	"Pathak, Pravin" <pravin.pathak@intel.com>,
	"users@dpdk.org" <users@dpdk.org>
Cc: "Trahe, Fiona" <fiona.trahe@intel.com>
Subject: Re: [dpdk-users] Run-to-completion or Pipe-line for QAT PMD in DPDK
Date: Fri, 18 Jan 2019 16:57:39 +0000	[thread overview]
Message-ID: <348A99DA5F5B7549AA880327E580B435896CD61A@IRSMSX101.ger.corp.intel.com> (raw)
In-Reply-To: <400475b7-869e-4281-9d31-058f96957fe1@default>

Hi Alex,

> -----Original Message-----
> From: Changchun Zhang [mailto:changchun.zhang@oracle.com]
> Sent: Friday, January 18, 2019 4:42 PM
> To: Trahe, Fiona <fiona.trahe@intel.com>; Pathak, Pravin <pravin.pathak@intel.com>;
> users@dpdk.org
> Subject: RE: [dpdk-users] Run-to-completion or Pipe-line for QAT PMD in DPDK
> 
> 
> 
> Thanks!
> Changchun (Alex)
> 
> 
> -----Original Message-----
> From: Trahe, Fiona [mailto:fiona.trahe@intel.com]
> Sent: Friday, January 18, 2019 11:26 AM
> To: Changchun Zhang <changchun.zhang@oracle.com>; Pathak, Pravin <pravin.pathak@intel.com>;
> users@dpdk.org
> Cc: Trahe, Fiona <fiona.trahe@intel.com>
> Subject: RE: [dpdk-users] Run-to-completion or Pipe-line for QAT PMD in DPDK
> 
> Hi Alex,
> > [changchun] In the same thread, but how about to dequeuer at the
> > beginning of the thread each time, if data presents then processing
> > them, if no data just do other work, and equeue the packets at some time but does not wait.
> > For example:
> > While(1)
> > {
> > 	Nb_ops = dequeuer();
> > 	If(nb_ops > )
> >              {
> >                  process_dequeued_data();
> >                  continue;
> >              }
> >
> >               Other_work();
> >               If(ipsec)
> >                   Enqueuer();
> > }
> > Does it make sense?
> [Fiona] It can, though on the first loop ro after a queit time youll proably get very few back on first and
> second dequeue as It'll be called immediately after the enqueue. Once it gets busy that could be ok
> though
> [changchun] Thank you Fiona. One more question, as you said, enqueuer/dequeue should be called
> within the same thread. Why? Is it because the other thread(lcore 1) cannot dequeuer the processed
> data from other thread(lcore 2)? But as the cryptograph device lib doc says, "it is howerver possible to
> use a different logical core to dequeuer an operation on a queue pair from the logical core which it
> was enqueued on". Looking forward to more details.
It's because the QAT inflight counter would be incremented and decremented by both threads so would need to be an atomic. It used to be atomic until 17.11 release but we got a good reduction in offload
cycle-count by replacing this with a normal variable and as all the feedback we got was that
applications were not using in pipeline mode we decided to 
trade off this limitation for the added performance. The limitation is documented here:
http://doc.dpdk.org/guides/cryptodevs/qat.html
You can look at code before 17.11 release to see the difference.

  reply	other threads:[~2019-01-18 16:57 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-17 23:00 Changchun Zhang
2019-01-18 13:13 ` Trahe, Fiona
2019-01-18 14:29   ` Pathak, Pravin
2019-01-18 15:44     ` Changchun Zhang
2019-01-18 16:26       ` Trahe, Fiona
2019-01-18 16:41         ` Changchun Zhang
2019-01-18 16:57           ` Trahe, Fiona [this message]
2019-01-18 17:55             ` Changchun Zhang
2019-01-18 18:20               ` Trahe, Fiona
2019-01-18 18:52                 ` Changchun Zhang

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=348A99DA5F5B7549AA880327E580B435896CD61A@IRSMSX101.ger.corp.intel.com \
    --to=fiona.trahe@intel.com \
    --cc=changchun.zhang@oracle.com \
    --cc=pravin.pathak@intel.com \
    --cc=users@dpdk.org \
    /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).