DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Elo, Matias (Nokia - FI/Espoo)" <matias.elo@nokia.com>
To: "Van Haaren, Harry" <harry.van.haaren@intel.com>
Cc: Jerin Jacob <jerin.jacob@caviumnetworks.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] eventdev: method for finding out unlink status
Date: Mon, 30 Jul 2018 10:28:35 +0000	[thread overview]
Message-ID: <90E39B85-3490-482B-9578-F2D94576111E@nokia.com> (raw)
In-Reply-To: <E923DB57A917B54B9182A2E928D00FA65E2957EB@IRSMSX102.ger.corp.intel.com>


> I don't think that the eventdev API requires 1:1 Lcore / Port mapping, so really a
> PMD should be able to handle any thread calling any port.
> 
> The event/sw PMD allows any thread to call dequeue/enqueue any port,
> so long as it is not being accessed by another thread.
> 
> 
>>>> A given event port assigned to a new lcore other than
>>>> it previous one then we need to do some clean up at port level.
>>> 
>>> In my case I'm mapping an event port per thread statically (basically
>> thread_id == port_id),
>>> so this shouldn't be an issue.
> 
> This is the common case - but I don't think we should demand it.
> There is a valid scale-down model which just polls *all* ports using
> a single lcore, instead of unlink() of multiple ports.

I agree, 1 : 1 Lcore / Port mapping shouldn't be required.


> I think the end result we're hoping for is something like pseudo code below,
> (keep in mind that the event/sw has a service-core thread running it, so no
> application code there):
> 
> int worker_poll = 1;
> 
> worker() {
>  while(worker_poll) {
>     // eventdev_dequeue_burst() etc
>  }
>  go_to_sleep(1);
> }
> 
> control_plane_scale_down() {
>  unlink(evdev, worker, queue_id);
>  while(unlinks_in_progress(evdev) > 0)
>      usleep(100);
> 
>  /* here we know that the unlink is complete.
>   * so we can now stop the worker from polling */
>  worker_poll = 0;
> }
> 
> Hope my pseudo-code makes pseudo-sense :)


Makes sense =)

One use case this API wouldn't support is if an application would
unlink only a subset of linked queues. In this case events could be still
arriving constantly after unlinks_in_progress() returns zero, so there is no way
for the application to know when all events from unlinked queues have been
processed. However, at least in our application this information is not needed.

  reply	other threads:[~2018-07-30 10:28 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-30  6:39 Elo, Matias (Nokia - FI/Espoo)
2018-07-30  7:54 ` Jerin Jacob
2018-07-30  9:17   ` Elo, Matias (Nokia - FI/Espoo)
2018-07-30  9:29     ` Jerin Jacob
2018-07-30  9:38       ` Van Haaren, Harry
2018-07-30 10:28         ` Elo, Matias (Nokia - FI/Espoo) [this message]
2018-07-30 10:36         ` Jerin Jacob
2018-07-30 13:36           ` Elo, Matias (Nokia - FI/Espoo)
2018-07-30 14:26             ` Jerin Jacob
2018-07-31  8:09               ` Elo, Matias (Nokia - FI/Espoo)
2018-07-31  8:31                 ` Jerin Jacob
2018-07-31  9:27                   ` Elo, Matias (Nokia - FI/Espoo)
2018-08-08 10:05                     ` Elo, Matias (Nokia - FI/Espoo)
2018-08-09 13:14                       ` Van Haaren, Harry
2018-08-09 14:18                         ` Jerin Jacob
2018-08-10 14:24                           ` Elo, Matias (Nokia - FI/Espoo)
2018-08-10 14:52                             ` Jerin Jacob
2018-08-10 16:55                               ` Van Haaren, Harry
2018-08-10 17:35                                 ` Jerin Jacob
2018-09-05  7:49                                   ` Elo, Matias (Nokia - FI/Espoo)
2018-09-12 15:17                                     ` Van Haaren, Harry
2018-07-30 15:32           ` Liang, Ma

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=90E39B85-3490-482B-9578-F2D94576111E@nokia.com \
    --to=matias.elo@nokia.com \
    --cc=dev@dpdk.org \
    --cc=harry.van.haaren@intel.com \
    --cc=jerin.jacob@caviumnetworks.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).