aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmocom/bsc/paging.h
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2022-11-29 12:37:53 +0100
committerPau Espin Pedrol <pespin@sysmocom.de>2022-11-30 20:23:39 +0100
commit867e73e96b1cea41ba09cbb9c3c41db91e9e4d65 (patch)
treef97c8f62dc98f61aceaffe50a2b9274c7e778987 /include/osmocom/bsc/paging.h
parentd681b897b60f5ff91ac339edb3e449877a649ae8 (diff)
paging: Optimize retrieving number of request per paging group
This patch caches the counts of initial paging requests for each paging group. This count is needed to estimate T3113 when a new incoming paging request is received and it has to be inserted into the queue. With this there's no need to traverse the whole initial_req_list every time a new incoming paging request is receiving, potentially saving lots of iteration and hence lots of CPU when the queue is long. Related: SYS#6200 Change-Id: I6994127827d120a0b4dd3de51e1ddde39f2fe531
Diffstat (limited to 'include/osmocom/bsc/paging.h')
-rw-r--r--include/osmocom/bsc/paging.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/osmocom/bsc/paging.h b/include/osmocom/bsc/paging.h
index b10c39893..15eb49e43 100644
--- a/include/osmocom/bsc/paging.h
+++ b/include/osmocom/bsc/paging.h
@@ -61,6 +61,9 @@ enum bsc_paging_reason {
*/
#define PAGING_THRESHOLD_X3113_DEFAULT_SEC 60
+#define MAX_PAGING_BLOCKS_CCCH 9
+#define MAX_BS_PA_MFRMS 9
+
struct bsc_paging_params {
enum bsc_paging_reason reason;
struct bsc_msc_data *msc;
@@ -117,6 +120,9 @@ struct gsm_bts_paging_state {
/* Number of requests in pending_requests_len */
unsigned int retrans_req_list_len;
+ /* Number of requests in initial_req_list, indexed by pgroup. */
+ unsigned int initial_req_pgroup_counts[MAX_PAGING_BLOCKS_CCCH * MAX_BS_PA_MFRMS];
+
struct gsm_bts *bts;
struct osmo_timer_list work_timer;