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/acl.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/plugins/acl/acl.h') diff --git a/src/plugins/acl/acl.h b/src/plugins/acl/acl.h index 310f80bfddc..c17946a9719 100644 --- a/src/plugins/acl/acl.h +++ b/src/plugins/acl/acl.h @@ -385,4 +385,12 @@ extern acl_main_t acl_main; void *acl_plugin_set_heap(); +typedef enum { + ACL_FA_REQ_SESS_RESCHEDULE = 0, + ACL_FA_N_REQ, +} acl_fa_sess_req_t; + +void aclp_post_session_change_request(acl_main_t *am, u32 target_thread, u32 target_session, acl_fa_sess_req_t request_type); +void aclp_swap_wip_and_pending_session_change_requests(acl_main_t *am, u32 target_thread); + #endif -- cgit 1.2.3-korg