From a41a0b5a4c8430a6141fc847d43484ab1c4b2a0a Mon Sep 17 00:00:00 2001 From: Florin Coras Date: Wed, 1 Mar 2023 22:22:30 -0800 Subject: vcl: do not stop listeners on vls epoll del Although removal from epoll means listener no longer accepts new sessions, the accept queue built by vpp cannot be drained by stopping the listener. Morover, some applications, e.g., nginx, might constantly remove and add listeners to their epfds. Removing listeners in such situations causes a lot of churn in vpp as segments and segment managers need to be recreated. Type: improvement Signed-off-by: Florin Coras Change-Id: Ia412b3f8d50fbb4881a99ff024f798353b521af7 --- src/vcl/vcl_locked.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/vcl/vcl_locked.c b/src/vcl/vcl_locked.c index 8b0c66d4bdd..563d97ef804 100644 --- a/src/vcl/vcl_locked.c +++ b/src/vcl/vcl_locked.c @@ -1312,7 +1312,13 @@ vls_mp_checks (vcl_locked_session_t * vls, int is_add) vls_listener_wrk_set (vls, vls->vcl_wrk_index, 1 /* is_active */); break; } - vls_listener_wrk_stop_listen (vls, vls->vcl_wrk_index); + /* Although removal from epoll means listener no longer accepts new + * sessions, the accept queue built by vpp cannot be drained by stopping + * the listener. Morover, some applications, e.g., nginx, might + * constantly remove and add listeners to their epfds. Removing + * listeners in such situations causes a lot of churn in vpp as segments + * and segment managers need to be recreated. */ + /* vls_listener_wrk_stop_listen (vls, vls->vcl_wrk_index); */ break; case VCL_STATE_LISTEN_NO_MQ: if (!is_add) -- cgit 1.2.3-korg