> On Dec 15, 2016, at 1:07 PM, Yuxin Ren <[email protected]> wrote:
> 
> On Thu, Dec 15, 2016 at 4:00 PM, Jarno Rajahalme <[email protected] 
> <mailto:[email protected]>> wrote:
>> 
>>> On Dec 15, 2016, at 7:55 AM, Yuxin Ren <[email protected]> wrote:
>>> 
>>> Hi,
>>> 
>>> I am a beginner to OVS.
>>> I have some basic questions about OVS.
>>> 
>>> Is it a multiple threads application?
>> 
>> Yes.
>> 
>>> If so, what data structures are shared by multiple threads?
>> 
>> Most of them, e.g., flow tables, group tables, and most of the internal data 
>> structures.
>> 
>>> What synchronization technique is used to protect shared data structures?
>>> 
>> 
>> Mutual exclusion locks, atomic variables, as well as RCU where reader 
>> performance is important.
>   Could you show me some code pieces that use locks?
>   And I know there is flow table in the kernel module, and it is
> protected by RCU.
>   But what are shared data structures used in the user space?
>   Could you point me some links to the code which protect those data
> structures?
> 

Read the files I referred to and then use e.g. “git grep” to find the code that 
uses those functions.

  Jarno

> Thank you so much!!
>> You should take a look at lib/ovs-atomic*.h, lib/ovs-thread.h, and 
>> lib/ovs-rcu.h, and then see how these constructs are used in the code.
>> 
>> Regards,
>> 
>>  Jarno
>> 
>> 
>>> Thanks a lot!!
>>> Yuxin
>>> _______________________________________________
>>> dev mailing list
>>> [email protected] <mailto:[email protected]>
>>> https://mail.openvswitch.org/mailman/listinfo/ovs-dev 
>>> <https://mail.openvswitch.org/mailman/listinfo/ovs-dev>
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to