From 595ef8b10ad81c6033df53dfbfdb8c1b01f6de87 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Fri, 25 Apr 2014 13:50:48 -0700 Subject: [PATCH] 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 --- lib/ovs-thread.c | 3 +++ 1 file changed, 3 insertions(+) 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"); } -- 2.43.0