On Mon, Jun 09, 2014 at 12:40:46PM -0700, Ben Pfaff wrote: > On Thu, May 29, 2014 at 04:15:46PM -0700, Alex Wang wrote: > > Non-leader revalidator thread uses pthread_barrier_* functions in their > > main loop to synchronize with leader thread. However, since those threads > > only call poll_block() intermittently, the poll interval check in > > poll_block() can wrongly take the time since last call as poll interval > > and issue the following warnings: > > > > "Unreasonably long XXXXms poll interval". > > > > To prevent it, this commit implements the barrier struct and operations > > for OVS which allow thread waiting on barrier via poll_block(). > > > > Signed-off-by: Alex Wang <al...@nicira.com> > > One advantage of such an OVS-specific barrier could be that one could > wait for the barrier or another event, or even add a barrier wait to > the main poll loop for a given thread. To do that, we would want to > make ovs_barrier_wait() only schedule a wake-up (with seq_wait()) > instead of actually calling poll_block(). Did you consider that?
Actually, never mind. Let's not generalize this before we need it. Would you mind revising this a bit? First, let's add a comment on each function. Second, most of the functions that end in _wait() in OVS don't actually wait, they usually just register for poll_block() to wake up. We usually use "block" to indicate a function that blocks, e.g. poll_block(), vconn_open_block(), jsonrpc_send_block(). So, would you mind renaming ovs_barrier_wait() to something with "block" in the name? _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev