-
-
Notifications
You must be signed in to change notification settings - Fork 240
Make core::Pool lock-free by using core::FreeList #602
Copy link
Copy link
Open
Labels
C-algorithmscategory: Algorithms and data structurescategory: Algorithms and data structuresC-performancecategory: Profiling and optimizationscategory: Profiling and optimizationshelp wantedLooking for contributorsLooking for contributors
Metadata
Metadata
Assignees
Labels
C-algorithmscategory: Algorithms and data structurescategory: Algorithms and data structuresC-performancecategory: Profiling and optimizationscategory: Profiling and optimizationshelp wantedLooking for contributorsLooking for contributors
Type
Fields
Give feedbackNo fields configured for Enhancement.
Projects
StatusShow more project fields
Help wanted
Last revised: Jun 2025
core::SlabPool implements slab pool. (Actual implementation is in core::SlabPoolImpl).
When an object is allocated, there are two main paths:
Currently, both paths runs under a mutex. Hot path uses a doubly linked-list of free slots.
We should update pool so that hot path will not use mutex, and will use lock-free freelist instead.
This is important to prevent priority inversion problems, because shared pools are used by both realtime and non-realtime threads.
core::FreeList was added in #734.