From 608f95cddc4e1e78b4d3ac3b2c3f1ae86f1fa632 Mon Sep 17 00:00:00 2001 From: Andrew Yourtchenko Date: Fri, 14 Sep 2018 11:21:58 +0200 Subject: acl-plugin: optimize session idle timer checks This commit adds explicit signaling from a non-owning thread to the owning thread to restart the session timer as necessary. Consequently, we now can sweep the session lists at their respective timeouts, rather than sweeping all the lists at the pace of the shortest timeout value, just taking care to wake up if the session requeue to a different list results in needing to wake up earlier. Change-Id: Ifc8c500f6988748f4cd3dc184dd7824321aaaaca Signed-off-by: Andrew Yourtchenko --- src/plugins/acl/session_inlines.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/plugins/acl/session_inlines.h') diff --git a/src/plugins/acl/session_inlines.h b/src/plugins/acl/session_inlines.h index db878c003e2..5e975300142 100644 --- a/src/plugins/acl/session_inlines.h +++ b/src/plugins/acl/session_inlines.h @@ -247,12 +247,12 @@ acl_fa_restart_timer_for_session (acl_main_t * am, u64 now, else { /* - * Our thread does not own this connection, so we can not delete - * The session. To avoid the complicated signaling, we simply - * pick the list waiting time to be the shortest of the timeouts. - * This way we do not have to do anything special, and let - * the regular requeue check take care of everything. + * Our thread does not own this connection, so we can not requeue + * The session. So we post the signal to the owner. */ + aclp_post_session_change_request (am, sess_id.thread_index, + sess_id.session_index, + ACL_FA_REQ_SESS_RESCHEDULE); return 0; } } -- cgit 1.2.3-korg