On Mar 28, 2014, at 1:26 PM, Pravin Shelar <pshe...@nicira.com> wrote:

> On Tue, Mar 25, 2014 at 2:35 PM, Jarno Rajahalme <jrajaha...@nicira.com> 
> wrote:
>> A datapath pointer is available only when holding a lock.  Change
>> ovs_flow_cmd_fill_info() and ovs_flow_cmd_build_info() to take a
>> dp_ifindex directly, rather than a datapath pointer that is then
>> (only) used to get the dp_ifindex.  This is useful, since the
>> dp_ifindex is available even when the datapath pointer is not, both
>> before and after taking a lock, which makes further critical section
>> reduction possible.
>> 
> After looking at this patch and last one, it looks like we are doing
> log more work just to make RCU checker happy.
> Can we just use rcu_read_lock() and unlock() to protect acts de-referencing ?
> 

It seems to me that it would be better to use 
rcu_dereference_check(flow->sw_acts, 1) instead, as that would have no overhead 
at all, and is functionally same, as the only time this would be called without 
locking is when the flow has been removed from the table. Thoughts?

  Jarno

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to