[ovs-dev] [urcu-fixes 2/4] ovs-thread: Quiesce in xpthread_barrier_wait().
Ben Pfaff
blp at nicira.com
Mon Apr 28 16:06:26 UTC 2014
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 <alexw at nicira.com>
Signed-off-by: Ben Pfaff <blp at nicira.com>
---
lib/ovs-thread.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lib/ovs-thread.c b/lib/ovs-thread.c
index 3ca686f..f33f5f1 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");
}
--
1.7.10.4
More information about the dev
mailing list