summaryrefslogtreecommitdiff
path: root/nest/proto.c
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2023-02-24 09:13:35 +0100
committerMaria Matejka <mq@ucw.cz>2023-04-04 17:00:59 +0200
commit571c4f69bfbcf437d848b332bb2f4995fea2347d (patch)
tree01af432e1fa4a61be6793be90c59bf4223de6539 /nest/proto.c
parentd9f0f4af7dc49c22232cc3be5e40866fc7d5dda7 (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/proto.c')
-rw-r--r--nest/proto.c1
1 files changed, 1 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);