summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-12-07Main IO loop shouldn't skip sockets when ping is receivedMaria Matejka
2021-12-02Standby memory pages are accounted for as overhead in show memory commandMaria Matejka
2021-12-01No memory unmapping when shutting downMaria Matejka
All the memory is just freed implicitly on exit, no need for page-by-page unmapping.
2021-12-01Faster shutdown and cleanups by freeing route attributes strictly from main loopMaria Matejka
2021-12-01Faster prune on table deletionMaria Matejka
2021-12-01Table prune routines request export announcements directlyMaria Matejka
2021-12-01fixed duplicate routes propagationMaria Matejka
2021-12-01Merge branch 'master' into HEADMaria Matejka
2021-12-01Fix of shutdown: premature log cleanup led to use-after-freeMaria Matejka
2021-12-01Page allocator moved from pools to IO loops.Maria Matejka
The resource pool system is highly hierarchical and keeping spare pages in pools leads to unnecessarily complex memory management. Loops have a flat hiearchy, at least for now, and it is therefore much easier to keep care of pages, especially in cases of excessive virtual memory fragmentation.
2021-11-30For safer memory allocations, resources are bound to loops.Maria Matejka
Also all loops have their basic resource pool for allocations which are auto-freed when the loop is stopping.
2021-11-27Memory statistics split into Effective and OverheadMaria Matejka
This feature is intended mostly for checking that BIRD's allocation strategies don't consume much memory space. There are some cases where withdrawing routes in a specific order lead to memory fragmentation and this output should give the user at least a notion of how much memory is actually used for data storage and how much memory is "just allocated" or used for overhead. Also raising the "system allocator overhead estimation" from 8 to 16 bytes; it is probably even more. I've found 16 as a local minimum in best scenarios among reachable machines. I couldn't find any reasonable method to estimate this value when BIRD starts up. This commit also fixes the inaccurate computation of memory overhead for slabs where the "system allocater overhead estimation" was improperly added to the size of mmap-ed memory.
2021-11-24fixup of table reload bugMaria Matejka
2021-11-24Directly mapped pages are kept for future use if temporarily not neededMaria Matejka
2021-11-24GDB pretty printer for resource poolsMaria Matejka
2021-11-23Fixed pipe reload/refeedMaria Matejka
2021-11-23Stored pages release routineMaria Matejka
2021-11-23Fixed channel export map confusionMaria Matejka
2021-11-22BGP: End route refresh before another startsMaria Matejka
2021-11-22RPKI has its own loopMaria Matejka
2021-11-22RPKI: Use the route refresh mechanism also for the first loadMaria Matejka
2021-11-22More information on RPKI errorsMaria Matejka
2021-11-22Higher settle times when route refresh in the source table is runningMaria Matejka
2021-11-22Corking also feed start to keep BIRD running when refeeds would easily cause ↵Maria Matejka
congestion
2021-11-22Route attribute cache is now lockless on read / clone.Maria Matejka
Lots of time was spent locking when accessing route attribute cache. This overhead should be now reduced to a minimum.
2021-11-22Route sources have their separate global lockMaria Matejka
2021-11-22Introducing basic RCU primitives for lock-less shared data structuresMaria Matejka
2021-11-22VRF setting reduced to one argument, using default dummy iface for default vrfMaria Matejka
2021-11-22Route table import-to-export announcement indirection to reduce pipe trafficMaria Matejka
2021-11-22Keeping un-unmmappable pages until they can be reusedMaria Matejka
On Linux, munmap() may fail with ENOMEM when virtual memory is too fragmented. Working this around by just keeping such blocks for future use.
2021-11-22Pipe runs in parallel.Maria Matejka
2021-11-22Routing tables now have their own loops.Maria Matejka
This basically means that: * there are some more levels of indirection and asynchronicity, mostly in cleanup procedures, requiring correct lock ordering * all the internal table operations (prune, next hop update) are done without blocking the other parts of BIRD * the protocols may get their own loops very soon
2021-11-22Route subscription uses eventsMaria Matejka
2021-11-22Global table update pool removedMaria Matejka
2021-11-22Locking route attributes cacheMaria Matejka
To access route attribute cache from multiple threads at once, we have to lock the cache on writing. The route attributes data structures are safe to read unless somebody tries to tamper with the cache itself.
2021-11-22Route sources have an explicit ownerMaria Matejka
This commit prevents use-after-free of routes belonging to protocols which have been already destroyed, delaying also all the protocols' shutdown until all of their routes have been finally propagated through all the pipes down to the appropriate exports. The use-after-free was somehow hypothetic yet theoretically possible in rare conditions, when one BGP protocol authors a lot of routes and the user deletes that protocol by reconfiguring in the same time as next hop update is requested, causing rte_better() to be called on a not-yet-pruned network prefix while the owner protocol has been already freed. In parallel execution environments, this would happen an inter-thread use-after-free, causing possible heisenbugs or other nasty problems.
2021-11-22Table cork: Stop creating updates when there are too many pending.Maria Matejka
The corked procedure gets a callback when uncorked. Supported by table maintenance routines and also BGP.
2021-11-22Split route table event into separate eventsMaria Matejka
The former rt_event is dropped in favour of separate table events. This allows for selective corking of NHU and prune.
2021-11-22Adding a generic cork mechanism for eventsMaria Matejka
2021-11-22Converting the former BFD loop to a universal IO loop and protocol loop.Maria Matejka
There is a simple universal IO loop, taking care of events, timers and sockets. Primarily, one instance of a protocol should use exactly one IO loop to do all its work, as is now done in BFD. Contrary to previous versions, the loop is now launched and cleaned by the nest/proto.c code, allowing for a protocol to just request its own loop by setting the loop's lock order in config higher than the_bird. It is not supported nor checked if any protocol changed the requested lock order in reconfigure. No protocol should do it at all.
2021-11-22Moved BFD IO loop out of BFD as we want to use it as socket-io coroutineMaria Matejka
2021-11-22Unified time for whole BIRDMaria Matejka
In previous versions, every thread used its own time structures, effectively leading to different time in every thread and strange logging messages. The time processing code now uses global atomic variables to keep current time available for fast concurrent reading and safe updates.
2021-11-22Debug messages with timestamps.Maria Matejka
On most of current hardware, getting monotonic clock is fast enough to get it and write for each debug message.
2021-11-22Lock position checking allows for safe lock unionsMaria Matejka
2021-11-22Coroutines: A simple and lightweight parallel execution framework.Maria Matejka
2021-11-22Locking subsystem: Just a global BIRD lock to begin with.Maria Matejka
2021-11-22Dropping the POSIX thread-local variables in favor of much easier-to-use C11 ↵Maria Matejka
thread-local variables
2021-11-22POSIX threads and thread-local storage is needed for concurrent executionMaria Matejka
2021-11-22Multithreaded BIRD needs reasonably new software to compileMaria Matejka
2021-11-22Fixing expensive list checks. Debug only commit.Maria Matejka