What you’ve written is a best an oversimplification. It’s not correct to say 
that vpp lacks lockless data structures, and that all table-programming 
activities require coarse-grained locking and/or barrier synchronization.

Rather than starting a discussion from first principles, would it be possible 
to describe what you’re trying to do in detail?

Thanks... Dave

From: vpp-dev@lists.fd.io <vpp-dev@lists.fd.io> On Behalf Of Satya Murthy
Sent: Tuesday, August 13, 2019 10:51 AM
To: vpp-dev@lists.fd.io
Subject: [vpp-dev] lockless architecture

Hi ,

Need some inputs on the lock less architecture with multi-threaded VPP system.

From the experiences we had so far, taking a lock ( whatsoever small time the 
lock is taken for ) degrades
the performance. Hence, trying to see if we have any feasibility of lockless 
architecture in VPP.
We have gone through this in deep but seeing few issues on implementing this.

1) The vnet library and other core plugins like acls/classifiers does not seem 
to be thread-safe. The data structures in these does not seem be be thread 
specific, and hence applications from different threads may not able to modify 
them without acquiring a lock. This poses an issue.

2) I think, this is the reason, the control plane operations via vpp-api are 
handled by single main thread. However, this model will have an issue of main 
thread needing to take a write-lock when it is trying to modify any data via 
control plane. Worker threads during this time have to wait for this lock 
causing performance degradation.

So, if both controlplane and data plane operations are performed by same thread 
(let's say by a specific worker), then we have an issue of underlying vnet 
layer not being thread-safe.

If go with the approach of main thread and worker thread handling control and 
data plane activities respectively, then we need to take lock which may degrade 
performance.

Any viable approach that can avoid both of these issues ?

--
Thanks & Regards,
Murthy
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#13724): https://lists.fd.io/g/vpp-dev/message/13724
Mute This Topic: https://lists.fd.io/mt/32853245/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to