0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-12-22 17:51:53 +00:00
Commit Graph

10 Commits

Author SHA1 Message Date
Maria Matejka
056659c94e Table exporter journal dumping and memsize
The show-memory command wasn't showing the consumed memory
properly because it ignored the journal size. Now it does.
2024-12-16 10:59:59 +01:00
Katerina Kubecova
d503204aa0 Lockfree journal: Cleanup hook runs only when needed.
The function lfjour_cleanup_hook() was scheduled each time any of the
journal recipients reached end of a block of journal items or read all
of journal items. Because lfjour_cleanup_hook() can clean only journal
items every recipient has processed, it was often called uselessly.

This commit restricts most of the unuseful scheduling. Only some
recipients are given a token alowing them to try to schedule the
cleanup hook. When a recipient wants to schedule the cleanup hook, it
checks whether it has a token. If yes, it decrements number of tokens
the journal has given (issued_tokens) and discards its own token. If
issued_tokens reaches zero, the recipient is allowed to schedule the
cleanup hook.

There is a maximum number of tokens a journal can give to its recipients
(max_tokens). A new recipient is given a token in its init, unless the
maximum number of tokens is reached. The rest of tokens is given to
customers in lfjour_cleanup_hook().

In the cleanup hook, the issued_tokens number is increased in order to
avoid calling the hook before it finishes. Then, tokens are given to the
slowest recipients (but never to more than max_token recipients). Before
leaving lfjour_cleanup_hook(), the issued_tokens number is decreased back.
If no other tokens are given, we have to make sure the
lfjour_cleanup_hook will be called again. If every item in journal was
read by every recipient, tokens are given to random recipients. If all
recipients with tokens managed to finish until now, we give the token to
the first unfinished customer we find, or we just call the hook again.
2024-12-10 23:37:20 +01:00
Maria Matejka
b797444e94 Merge commit 'b95dc8f29f18eb177f91fdc4bf0716fac9b15366' into mq-config-ref
Also converted all _Bool's to bool.
2024-06-26 17:19:24 +02:00
Maria Matejka
0b6e752bd9 Conflating multiple partial ROA reload requests together 2024-06-26 11:29:43 +02:00
Maria Matejka
29cd2c0170 Refactored the deferring framework into a separate structure 2024-05-22 11:34:34 +02:00
Maria Matejka
2b38a833cd Avoiding RCU synchronization deadlock when locking in critical section
Explicitly marking domains eligible for RCU synchronization. It's then
forbidden to lock these domains in RCU critical section to avoid
possible deadlock.
2024-05-22 11:34:34 +02:00
Maria Matejka
e0a1bbdf65 Lockfree usecount: deferring unlocks to the metaloop
This allows us for easy temporary locks without additional burden of explicit cleanup.
2024-05-22 11:34:34 +02:00
Maria Matejka
23f7208a82 Lock free journal refactored into a separate data structure 2024-05-22 11:34:34 +02:00
Maria Matejka
9624ebfd9a Lock free usecount better debuggability 2024-01-10 09:19:27 +01:00
Maria Matejka
1df615991c Generalized the rte_src lockfree usecount algorithm 2023-12-04 10:39:32 +01:00