DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Van Haaren, Harry" <harry.van.haaren@intel.com>
To: "dev@dpdk.org" <dev@dpdk.org>
Cc: 'Jerin Jacob' <jerin.jacob@caviumnetworks.com>,
	"thomas@monjalon.net" <thomas@monjalon.net>,
	"Wiles, Keith" <keith.wiles@intel.com>,
	"Richardson, Bruce" <bruce.richardson@intel.com>
Subject: [dpdk-dev] Service lcores and Application lcores
Date: Thu, 29 Jun 2017 14:36:04 +0000	[thread overview]
Message-ID: <E923DB57A917B54B9182A2E928D00FA640C33E88@IRSMSX102.ger.corp.intel.com> (raw)

Hi All,


The recently posted service cores patchset[1], introduces service lcores to run services for DPDK applications. Services are just an ordinary function for eg: eventdev scheduling, NIC RX, statistics and monitoring, etc. A service is just a callback function, which a core invokes. An atomic ensures that services that are
non-multi-thread-safe are never concurrently invoked.

The topic of discussion in this thread is how we can ensure that application lcores do not interfere with service cores. I have a solution described below, opinions welcome.


Regards, -Harry


PS: This discussion extends that in the ML thread here[2], participants of that thread added to CC.

[1] Service Cores v2 patchset http://dpdk.org/dev/patchwork/bundle/hvanhaar/service_cores_v2/
[2] http://dpdk.org/ml/archives/dev/2017-June/069290.html


________________________



A proposal for Eventdev, to ensure Service lcores and Application lcores play nice;

1) Application lcores must not directly call rte_eventdev_schedule()
2A) Service cores are the proper method to run services
2B) If an application insists on running a service "manually" on an app lcore, we provide a function for that:
     rte_service_run_from_app_lcore(struct service *srv);

The above function would allow a pesky app to run services on its own (non-service core) lcores, but
does so through the service-core framework, allowing the service-library atomic to keep access serialized as required for non-multi-thread-safe services.

The above solution maintains the option of running the eventdev PMD as now (single-core dedicated to a single service), while providing correct serialization by using the rte_service_run_from_app_lcore() function. Given the atomic is only used when required (multiple cores mapped to the service) there should be no performance delta.

Given that the application should not invoke rte_eventdev_schedule(), we could even consider removing it from the Eventdev API. A PMD that requires cycles registers a service, and an application can use a service core or the run_from_app_lcore() function if it wishes to invoke that service on an application owned lcore.


Opinions?

             reply	other threads:[~2017-06-29 14:36 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-29 14:36 Van Haaren, Harry [this message]
2017-06-29 15:16 ` Thomas Monjalon
2017-06-29 16:35   ` Van Haaren, Harry
2017-06-29 20:18     ` Thomas Monjalon
2017-06-30  8:52       ` Van Haaren, Harry
2017-06-30  9:29         ` Thomas Monjalon
2017-06-30 10:18           ` Van Haaren, Harry
2017-06-30 10:38             ` Thomas Monjalon
2017-06-30 11:14               ` Van Haaren, Harry
2017-06-30 13:04                 ` Jerin Jacob
2017-06-30 13:16                   ` Van Haaren, Harry
2017-06-29 15:57 ` Bruce Richardson
2017-06-30  4:45   ` Jerin Jacob
2017-06-30 10:00     ` Van Haaren, Harry
2017-06-30 12:51       ` Jerin Jacob
2017-06-30 13:08         ` Van Haaren, Harry
2017-06-30 13:20           ` Jerin Jacob
2017-06-30 13:24             ` Van Haaren, Harry
2017-06-30 13:51               ` 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=E923DB57A917B54B9182A2E928D00FA640C33E88@IRSMSX102.ger.corp.intel.com \
    --to=harry.van.haaren@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=jerin.jacob@caviumnetworks.com \
    --cc=keith.wiles@intel.com \
    --cc=thomas@monjalon.net \
    /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).