From: Daniel Verkamp <daniel.verkamp@intel.com>
To: Jason Lefley <jason.lefley@aclectic.com>, users@dpdk.org
Cc: yahya@aclectic.com
Subject: Re: [dpdk-users] Using DPDK EAL with existing multi-threaded application
Date: Fri, 11 Nov 2016 11:19:44 -0700 [thread overview]
Message-ID: <80e0712c-6bc6-745e-bf5e-610bae2290f0@intel.com> (raw)
In-Reply-To: <A806B085-DCB5-4481-9693-EE5DE9FE7829@aclectic.com>
On 11/07/2016 11:39 PM, Jason Lefley wrote:
> I am working on leveraging SPDK (which internally uses EAL from DPDK)
> from an existing application that uses Intel’s TBB. I do not need to
> use EAL for multithreading but SPDK does require at least huge page
> support and PCI access from EAL.
>
> I noticed that if I try to use TBB’s parallel_for() after I have
> called rte_eal_init(), then the TBB operation doesn’t actually run in
> parallel. If I remove the call to rte_eal_init(), the TBB operations
> work as expected however I then cannot use SPDK. Does anyone have any
> input regarding how I can keep my existing multi-threaded application
> working as intended as I integrate SPDK/DPDK?
>
> Thanks
>
Hi Jason,
If you are not calling any functions that rely on DPDK's lcore pinning
for correctness, you should be able to change the calling thread's CPU
affinity with rte_thread_set_affinity() so that newly-created threads
can run on more than one CPU core. I am not sure how TBB creates its
threads, but as long as you set the affinity before calling any TBB
functions, the updated CPU affinity should be inherited by any
newly-created threads.
There is a recently-implemented helper function in SPDK to temporarily
change the thread affinity in this way:
https://github.com/spdk/spdk/commit/fa5206c416144b41c384d678cf33f98f1fe1042c
Thanks,
-- Daniel
next prev parent reply other threads:[~2016-11-11 18:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-08 6:39 Jason Lefley
2016-11-09 17:12 ` Jason Lefley
2016-11-11 18:19 ` Daniel Verkamp [this message]
2016-11-15 23:32 ` Jason Lefley
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=80e0712c-6bc6-745e-bf5e-610bae2290f0@intel.com \
--to=daniel.verkamp@intel.com \
--cc=jason.lefley@aclectic.com \
--cc=users@dpdk.org \
--cc=yahya@aclectic.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).