Maria Matejka
b03625698b
fixup! fixup! fixup! IO: Allow to take new loops if the thread is hot, but only one at time
2024-06-27 14:35:47 +02:00
Maria Matejka
4d502e934a
fixup! fixup! IO: Allow to take new loops if the thread is hot, but only one at time
2024-06-27 14:28:49 +02:00
Maria Matejka
825be30115
fixup! IO: Allow to take new loops if the thread is hot, but only one at time
2024-06-27 14:25:06 +02:00
Maria Matejka
5288e22d22
fixup! fixup! show threads: displaying the same thread id's as in log
2024-06-27 14:19:29 +02:00
Maria Matejka
8d3a5cad41
fixup! show threads: displaying the same thread id's as in log
2024-06-27 14:15:01 +02:00
Maria Matejka
71d362d439
show threads: displaying the same thread id's as in log
2024-06-27 14:04:26 +02:00
Maria Matejka
e96c44e32d
fixup! Forbid locking altogether when RCU reader is active
2024-06-27 09:08:01 +02:00
Maria Matejka
8424941f95
Forbid locking altogether when RCU reader is active
2024-06-27 08:42:18 +02:00
Maria Matejka
e2a427fc30
Flush deferred calls directly after the loop finished its one run
2024-06-27 08:37:05 +02:00
Maria Matejka
2bf28e790e
IO: Allow to take new loops if the thread is hot, but only one at time
2024-06-27 08:26:00 +02:00
Maria Matejka
18d069d663
Even on shutdown we should try to pass the freed memory to others
2024-06-27 08:22:15 +02:00
Maria Matejka
af73cc4215
Allocator now reports cold pages
2024-06-26 20:45:54 +02: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
2a6fe617b1
IO: allow for faster loop dropping
2024-06-26 11:30:48 +02:00
Maria Matejka
7d455d64ca
Remove spinlock debug structures in production build
2024-06-26 11:30:41 +02:00
Maria Matejka
2c4b368176
RPKI socket read is prioritized over other sockets
2024-06-26 11:29:43 +02:00
Maria Matejka
9be90c0f84
Fixed a race condition in rcu-domain blocking
2024-06-19 12:36:55 +02:00
Maria Matejka
dda37842dc
No page flush before polling
...
The maximum amount of locally kept pages is 128 so we can just
well keep the half-meg of RAM allocated and prepared for future use.
2024-06-18 11:02:51 +02:00
Maria Matejka
83045e9a1f
Configuration obstacles made a separate, explicit structure
...
With this, one can walk the obstacle list in a debugger and
easier see which specific object is holding the reference.
2024-06-14 23:16:07 +02:00
Maria Matejka
61dcbb1d83
Global runtime values separated from config
2024-06-14 23:16:07 +02:00
Maria Matejka
397eee5a00
Config: Removed obsolete force_restart option when commiting
2024-06-14 23:16:07 +02:00
Maria Matejka
ea4aef2a14
Memory allocator tweaking
...
TODO: make this configurable
2024-06-12 14:48:33 +02:00
Maria Matejka
5c8179d63a
Time accounting must be done by coarse timers
...
on some ARM, the precise timers are too slow to be actually useful
2024-06-12 14:48:33 +02:00
Maria Matejka
2e882d4a7d
IO Loop: process socket reads only after timers and events are done
2024-06-12 14:48:33 +02:00
Maria Matejka
50d7287741
IO Threads: scheduler debug shows info on next loop to run
2024-06-12 14:48:33 +02:00
Maria Matejka
1180f25123
Threads: smoothening loop pickup and less aggressive dropping
2024-06-12 14:48:33 +02:00
Maria Matejka
8ad9c946e1
IO loop picker fixed
...
Now if the thread finds out that it actually isn't busy,
it unsets the business status and picks something up right away.
2024-06-12 14:48:33 +02:00
Maria Matejka
4bca3b9f86
Task-in-limit checker hacked for mainloop
2024-06-12 14:48:33 +02:00
Maria Matejka
661193cf98
Thread IO: a little bit faster RX repeat
2024-06-12 14:48:33 +02:00
Maria Matejka
bf961ba405
Threads shouldn't drop stopping loops
2024-06-12 09:23:50 +02:00
Maria Matejka
0fb9177374
Loop scheduler tracing options configurable
2024-06-12 09:23:50 +02:00
Maria Matejka
67e9a37291
Fixed nanoseconds in IO loop time limiter
2024-06-12 09:23:50 +02:00
Maria Matejka
4104d668d9
Read-write spinlocks
2024-06-12 09:23:50 +02:00
Maria Matejka
6ffab25f01
IO loop: fixed unassigned count
2024-06-04 22:20:18 +02:00
Maria Matejka
423eaf3438
Softened warning about too much time spent in loop
...
Now the warning needs at least 10 ms after the scheduled end time
to ever complain.
TODO: make this configurable
2024-06-04 22:20:18 +02:00
Maria Matejka
2705c385c0
Never allow more than 300 ms per loop
2024-06-04 10:11:36 +02:00
Maria Matejka
dc416d2de3
RCU: Rewritten to be more straightforward
2024-06-04 10:11:36 +02:00
Maria Matejka
10bb1c1e9d
Real almost-lockless feeds and more pull-like exports
...
Introducing a new omnipotent internal API to just pass route updates
from whatever point wherever we want.
From now on, all the exports should be processed by RT_WALK_EXPORTS
macro, and you can also issue a separate feed-only request to just get a
feed and finish.
The exporters can now also stop and the readers must expect that to
happen and recover. Main tables don't stop, though.
2024-06-04 10:11:36 +02:00
Maria Matejka
b5f803ce4a
Simplified temporary resources
...
Also TMP_SAVED now uses the CLEANUP hook to allow for breaks and returns
2024-05-25 19:37:16 +02:00
Maria Matejka
76ca53e4f8
SKIP_BACK_DECLARE: easier embedded-to-parent typecasting
2024-05-25 19:37:16 +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
eaf187b57b
Table feeds are now lockless
...
This commit makes the route chains in the tables atomic. This allows not
only standard exports but also feeds and bulk exports to be processed
without ever locking the table.
Design note: the overall data structures are quite brittle. We're using
RCU read-locks to keep track about readers, and we're indicating ongoing
work on the data structures by prepending a REF_OBSOLETE sentinel node
to make every reader go waiting.
All the operations are intended to stay inside nest/rt-table.c and it
may be even best to further refactor the code to hide the routing table
internal structure inside there. Nobody shall definitely write any
routines manipulating live routes in tables from outside.
2024-05-22 11:34:34 +02:00
Maria Matejka
a716e7ea79
Kernel: replaced synchronous prune by a refeed
2024-05-22 11:34:34 +02:00
Maria Matejka
46164395b2
Fixed all implicit seq_cst warnings caused by the previous commit
2024-05-22 11:34:34 +02:00
Maria Matejka
6a13c02d3b
Removed the obsolete birdloop flagger
...
This was useful when events were locking. As now sending events is lockless,
we can drop this obsolete routine for good.
2024-05-22 11:34:34 +02:00
Maria Matejka
0046594237
Missing definition of RTAX_FASTOPEN_NO_COOKIE shouldn't kill the whole build
2024-05-19 12:47:38 +02:00
Maria Matejka
fe3d7c1a17
Merge a branch of fixes and updates needed for stabilization of v3.
...
Merge commit 'c06ce709' into HEAD
2024-05-19 11:28:03 +02:00
Maria Matejka
4b9d12708e
Loop run waits until pingers finish
...
This ensures that if somebody passes an event to a loop which
has just started executing, then the event gets picked up. Otherwise
there is a race condition causing stray events pending in queue
but without the ping (because the run actually finishes too fast
to pickup the later events).
2024-05-18 15:50:03 +02:00
Maria Matejka
67f6ac1628
IO Loop: provide information about current loop and task time limit
2024-05-18 15:48:03 +02:00