]> git.ipfire.org Git - thirdparty/bird.git/commit - nest/proto.c
Rate-limit scheduling of work-events
authorOndrej Zajicek (work) <santiago@crfreenet.org>
Fri, 12 Mar 2021 14:35:56 +0000 (15:35 +0100)
committerOndrej Zajicek (work) <santiago@crfreenet.org>
Fri, 12 Mar 2021 14:35:56 +0000 (15:35 +0100)
commit7be3af7fa662958782d2e23989d79cc2c652b6bf
treeaeecb3e36af55eb4367f0b5218e3301d6383808e
parent9cf3d533110313d55b60d47c134f1b7050d6be78
Rate-limit scheduling of work-events

In general, events are code handling some some condition, which is
scheduled when such condition happened and executed independently from
I/O loop. Work-events are a subgroup of events that are scheduled
repeatedly until some (often significant) work is done (e.g. feeding
routes to protocol). All scheduled events are executed during each
I/O loop iteration.

Separate work-events from regular events to a separate queue and
rate limit their execution to a fixed number per I/O loop iteration.
That should prevent excess latency when many work-events are
scheduled at one time (e.g. simultaneous reload of many BGP sessions).
lib/event.c
lib/event.h
nest/proto.c
sysdep/unix/io.c