From: Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>
To: Jim Murphy <jmurphy@arista.com>,
Stephen Hemminger <stephen@networkplumber.org>
Cc: Brijesh Singh <brijesh.s.singh@gmail.com>,
"dev@dpdk.org" <dev@dpdk.org>, nd <nd@arm.com>
Subject: Re: [dpdk-dev] rte_hash thread safe
Date: Tue, 24 Apr 2018 06:36:27 +0000 [thread overview]
Message-ID: <HE1PR0801MB1930E97223ED1DFD8828361A98880@HE1PR0801MB1930.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <CAJC5fi2u-6vYVV7V6pFOHsTDmXMzTXWoHYXtopP-fxqK1kahFg@mail.gmail.com>
Another idea would be to keep the synchronization at the thread level and let the application handle RCU. This will keep the cost down if the application has multiple tables requiring RCU. It will also allow the application to use its own methods to declare end of quiescent period.
However, the rte_hash library has to support this. There needs to be a distinction between deleting an entry and freeing the memory (or returning the entry to the free pool) associated with the entry. Freeing of the memory needs to happen after the quiescent period.
-----Original Message-----
From: dev <dev-bounces@dpdk.org> On Behalf Of Jim Murphy
Sent: Monday, April 23, 2018 9:13 PM
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: Brijesh Singh <brijesh.s.singh@gmail.com>; dev@dpdk.org
Subject: Re: [dpdk-dev] rte_hash thread safe
Right, the threads using the DPDK libraries must do the right RCU stuff, declare quiescent, etc.
I mentioned hooks to address the licensing issue. So for places in rte_hash were synchronization must be done a no-op function could be called but users could replace that function with one of their choosing.
Thanks,
Jim
On Mon, Apr 23, 2018 at 6:14 PM, Stephen Hemminger < stephen@networkplumber.org> wrote:
> On Mon, 23 Apr 2018 17:48:50 -0700
> Jim Murphy <jmurphy@arista.com> wrote:
>
> > Anecdotally I've heard that the urcu hash implementation is slower
> > than rte_hash based on pure lookup performance. Has anyone
> > considered adding
> RCU
> > hooks into rte_hash?
>
>
> Not really possible with DPDK (as I said earlier) because DPDK does
> not have concept of thread quiescent period to allow for safe
> deletion. You could manually use RCU concepts of RCU and RTE hash; it
> would require using userspace RCU primitives inside DPDK. This would
> cause a dependency that would prevent that from ever being merged
> upstream due to license conflict; but since DPDK is liberal BSD
> license you are free to do it and maintain it on your own.
>
next prev parent reply other threads:[~2018-04-24 6:36 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-12 4:12 Brijesh Singh
2018-04-23 19:40 ` Brijesh Singh
2018-04-23 23:50 ` Stephen Hemminger
2018-04-24 0:21 ` Jim Murphy
2018-04-24 0:30 ` Stephen Hemminger
2018-04-24 0:48 ` Jim Murphy
2018-04-24 1:14 ` Stephen Hemminger
2018-04-24 2:13 ` Jim Murphy
2018-04-24 6:36 ` Honnappa Nagarahalli [this message]
2018-04-24 15:04 ` Brijesh Singh
2018-04-25 6:45 ` Shyam Shrivastav
2018-04-24 3:48 ` Jerin Jacob
2018-04-24 5:02 ` Stephen Hemminger
2018-04-24 6:12 ` Honnappa Nagarahalli
2018-04-24 11:03 ` Ananyev, Konstantin
2018-04-24 11:07 ` Bruce Richardson
2018-05-24 17:35 ` Wang, Yipeng1
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=HE1PR0801MB1930E97223ED1DFD8828361A98880@HE1PR0801MB1930.eurprd08.prod.outlook.com \
--to=honnappa.nagarahalli@arm.com \
--cc=brijesh.s.singh@gmail.com \
--cc=dev@dpdk.org \
--cc=jmurphy@arista.com \
--cc=nd@arm.com \
--cc=stephen@networkplumber.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).