2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-25 15:07:05 +00:00

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 <alexw@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Alex Wang <alexw@nicira.com>
This commit is contained in:
Ben Pfaff
2014-04-25 13:50:48 -07:00
parent 3308c69622
commit 595ef8b10a

View File

@@ -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");
}