[dpdk-dev] Sharing Data structure between logical cores in DPDK- regarding
Honnappa Nagarahalli
Honnappa.Nagarahalli at arm.com
Tue Dec 10 06:56:32 CET 2019
<snip>
>
> It depends on the datastructure.
>
> If you use rte_hash, with the thread safety flags, it's safe.
>
> In any case having a lot of cores accessing the same DS will lead to bad
> performance. You should try to have per-core data structures whenever
> possible.
Even better if you can create a lock free data structure and combine it with RCU. You can look at lock-free version of rte_hash implementation. There was a presentation done on this topic in the previous DPDK summit[1].
[1] https://dpdkuserspace2018.sched.com/event/G44w/lock-free-read-write-concurrency-in-rtehash
>
> Tom
>
> ________________________________________
> De : dev <dev-bounces at dpdk.org> de la part de Perugu Hemasai Chandra
> Prasad <hemasaiperugu at 5g.iith.ac.in> Envoyé : jeudi 5 décembre 2019
> 11:16 À : users at dpdk.org; dev at dpdk.org
> Objet : [dpdk-dev] Sharing Data structure between logical cores in DPDK-
> regarding
>
> Hi All,
> I have a small doubt, can we share a data structure between multiple
> logical cores in DPDK without locking? I have tested it by sharing a small
> structure with two variable and incrementing them in all logical cores. It ran
> smooth I didn't get any issue. But I doubt if we can run it for long time with
> some huge data structure having many elements getting accessed by multiple
> logical cores.
> Can anyone please clarify this.
>
> Thanks and regards,
> Hemasai.
More information about the dev
mailing list