diff options
author | Maria Matejka <mq@ucw.cz> | 2023-02-24 09:13:35 +0100 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2023-04-04 17:00:59 +0200 |
commit | 571c4f69bfbcf437d848b332bb2f4995fea2347d (patch) | |
tree | 01af432e1fa4a61be6793be90c59bf4223de6539 /nest | |
parent | d9f0f4af7dc49c22232cc3be5e40866fc7d5dda7 (diff) |
More efficient IO loop event execution to avoid long loops
If there are lots of loops in a single thread and only some of the loops
are actually active, the other loops are now kept aside and not checked
until they actually get some timers, events or active sockets.
This should help with extreme loads like 100k tables and protocols.
Also ping and loop pickup mechanism was allowing subtle race
conditions. Now properly handling collisions between loop ping and pickup.
Diffstat (limited to 'nest')
-rw-r--r-- | nest/proto.c | 1 | ||||
-rw-r--r-- | nest/rt-table.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/nest/proto.c b/nest/proto.c index e02e232d..21460e56 100644 --- a/nest/proto.c +++ b/nest/proto.c @@ -1131,6 +1131,7 @@ proto_loop_stopped(void *ptr) birdloop_enter(&main_birdloop); + birdloop_free(p->loop); p->loop = &main_birdloop; proto_cleanup(p); diff --git a/nest/rt-table.c b/nest/rt-table.c index 6be47470..54aa90a6 100644 --- a/nest/rt-table.c +++ b/nest/rt-table.c @@ -4073,6 +4073,7 @@ rt_delete(void *tab_) RT_UNLOCK(RT_PUB(tab)); + birdloop_free(tab->loop); rfree(tab->rp); config_del_obstacle(conf); |