On 16/05/2016 13:31, "Ben Pfaff" <b...@ovn.org> wrote:
>On Fri, Apr 22, 2016 at 06:03:02PM -0700, Daniele Di Proietto wrote:
>> ovs_mutex_cond_wait() is used in many functions in dpif-netdev to
>> synchronize with pmd threads, but we can't guarantee that the callers do
>> not hold RCU references, so it's better to avoid quiescing.
>>
>> In system_stats_thread_func() the code relied on ovs_mutex_cond_wait()
>> to introduce a quiescent state, so explicit calls to
>> ovsrcu_quiesce_start() and ovsrcu_quiesce_end() are added there.
>>
>> Signed-off-by: Daniele Di Proietto <diproiet...@vmware.com>
>
>This seems reasonable to me, but I recommend adding a comment on
>ovs_mutex_cond_wait() suggesting that the caller quiesce, so that it's
>harder to get that wrong in the future:
>
>/* Provides an error-checking wrapper around pthread_cond_wait().
> *
> * If the wait can take a significant amount of time, consider bracketing this
> * call with calls to ovsrcu_quiesce_start() and ovsrcu_quiesce_end(). */
>
>Acked-by: Ben Pfaff <b...@ovn.org>
>
>(I'm not planning to review the other patches, I'm reviewing this one
>because Daniele asked me to look at it.)
>
>Thanks,
>
>Ben.
Thanks for reviewing this, I've added the comment you suggested and applied
this to master
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev