On 24/03/2016 09:18, "Ben Pfaff" <b...@ovn.org> wrote:
>On Wed, Mar 23, 2016 at 06:02:58PM -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, and >> calling ovsrcu_quiesce_end() there will cause the parent to end its >> (possible) quiescing state, which it's not required to start a child >> thread. >> >> 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). > >This looks correct, but now I remember why I might have put this in. >Something has to put the initial thread of the program into a >nonquiescent state for the first time. I think that might have been the >purpose here. If we remove it, what does this? You're right, I didn't realize this! As discussed offline, instead of removing the call to ovsrcu_quiesce_end() I've wrapped it in an ovsthread_once construct (a boolean would be enough, but I think ovsthread_once is more clear). I've sent a v2 here: http://openvswitch.org/pipermail/dev/2016-March/068480.html Thanks for noticing this! > >Thanks, > >Ben. _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev