From: Ben Pfaff Date: Fri, 25 Apr 2014 20:50:48 +0000 (-0700) Subject: ovs-thread: Quiesce in xpthread_barrier_wait(). X-Git-Tag: sliver-openvswitch-2.2.90-1~3^2~64 X-Git-Url: http://git.onelab.eu/?p=sliver-openvswitch.git;a=commitdiff_plain;h=595ef8b10ad81c6033df53dfbfdb8c1b01f6de87 ovs-thread: Quiesce in xpthread_barrier_wait(). Otherwise the udpif revalidator threads can postpone RCU callbacks essentially forever, especially if there are many revalidator threads and little network traffic. Reported-by: Alex Wang Signed-off-by: Ben Pfaff Acked-by: Alex Wang --- diff --git a/lib/ovs-thread.c b/lib/ovs-thread.c index 3ca686f35..f33f5f110 100644 --- a/lib/ovs-thread.c +++ b/lib/ovs-thread.c @@ -240,7 +240,10 @@ xpthread_barrier_wait(pthread_barrier_t *barrier) { int error; + ovsrcu_quiesce_start(); error = pthread_barrier_wait(barrier); + ovsrcu_quiesce_end(); + if (error && OVS_UNLIKELY(error != PTHREAD_BARRIER_SERIAL_THREAD)) { ovs_abort(error, "pthread_barrier_wait failed"); }