session: basic support for interrupt mode
Experimental support for session layer interrupt mode. When enabled
(use-private-rx-mqs must be set) session queue node switches to
interrupt state when lightly loaded, i.e., no events and less than 1
vector/dispatch.
Because transport protocols require a periodic time update, when in
interrupt state the session queue node workers register a timerfd with
the unix-epoll-input node that when triggered signals, i.e., wakes up,
the queue node. Under light load, the timer is set to trigger every 1ms
whereas if no session is allocated, the worker moves to idle state and
the timeout is set to 100ms.
Type: feature
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I905b00777fbc025faf9c4074fce4c516cd139387
diff --git a/src/vnet/session/application.c b/src/vnet/session/application.c
index 16acc9c..a93e4b9 100644
--- a/src/vnet/session/application.c
+++ b/src/vnet/session/application.c
@@ -497,6 +497,9 @@
if (aw->pending_rx_mqs)
vlib_node_set_interrupt_pending (vm, appsl_rx_mqs_input_node.index);
+ if (n_msgs && wrk->state == SESSION_WRK_INTERRUPT)
+ vlib_node_set_interrupt_pending (vm, session_queue_node.index);
+
return n_msgs;
}