Clean up multi-thread barrier-sync hold-down timer 21/19121/4
authorDave Barach <[email protected]>
Tue, 23 Apr 2019 19:13:14 +0000 (15:13 -0400)
committerDave Wallace <[email protected]>
Thu, 2 May 2019 22:33:37 +0000 (22:33 +0000)
commite1062522d51e50cfd557a8ab66dfe19f1f86b65b
treee196942543b93f4a200caa863abf91148ccd45d4
parent15c31921a628c5500cbed2ebc588d7ddbaa970a3
Clean up multi-thread barrier-sync hold-down timer

Main thread: don't bother with the barrier sync hold-down timer if
none of the worker threads are busy.

Worker threads: avoid epoll_pwait (10ms timeout) when the
control-plane has been active in the last half-second.

Cherry-pick a recent dangling reference fix: pool_elt_at_index after
e.g. rx callback is required, in case the unix file pool expands.

DO NOT cherry-pick the patch into master!

Change-Id: I130dc72fd95c8a22716fa2f0f98ce35cdccc52d7
Signed-off-by: Dave Barach <[email protected]>
src/vlib/main.h
src/vlib/threads.c
src/vlib/threads.h
src/vlib/unix/input.c