[ovs-dev] [RFC] ovs-thread: Implement OVS specific barrier.
Ben Pfaff
blp at nicira.com
Mon Jun 9 19:40:46 UTC 2014
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 <alexw at 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?
More information about the dev
mailing list