[ovs-dev] [PATCH v2] ovs-thread: Do not always end quiescent state in ovs_thread_create().

Daniele Di Proietto diproiettod at vmware.com
Fri Mar 25 18:48:10 UTC 2016


On 25/03/2016 08:46, "Ben Pfaff" <blp at ovn.org> wrote:

>On Thu, Mar 24, 2016 at 11:31:09AM -0700, Daniele Di Proietto wrote:
>> A new thread must be started in a non quiescent state.  There is a call
>> to ovsrcu_quiesce_end() in ovsthread_wrapper(), to enforce this.
>> 
>> ovs_thread_create(), instead, is executed in the parent thread. It must
>> call ovsrcu_quiesce_end() on its first invocation, to put the main
>> thread in a non quiescent state.  On every other invocation, it doesn't
>> make sense to alter the calling thread state, so this commits wraps the
>> call to ovsrcu_quiesce_end() in an ovsthread_once construct.
>> 
>> This fixes a bug in ovs-rcu where the first call in the process to
>> ovsrcu_quiesce_start() will not be honored, because the calling thread
>> will need to create the 'urcu' thread (and creating a thread will
>> wrongly end its quiescent state).
>
>Acked-by: Ben Pfaff <blp at ovn.org>

Thanks for the review!

Pushed to master, and back ported up to branch-2.3




More information about the dev mailing list