-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
io: remove slab in favor of Arc and allocations (#5833)
This patch removes the custom slab in favor of regular allocations an `Arc`. Originally, the slab was used to be able to pass indexes as tokens to the I/O driver when registering I/O resources. However, this has the downside of having a more expensive token lookup path. It also pins a `ScheduledIo` to a specific I/O driver. Additionally, the slab is approaching custom allocator territory. We plan to explore migrating I/O resources between I/O drivers. As a step towards that, we need to decouple `ScheduledIo` from the I/O driver. To do this, the patch uses plain-old allocation to allocate the `ScheduledIo` and we use the pointer as the token. To use the token, we need to be very careful about releasing the `ScheduledIo`. We need to make sure that the associated I/O handle is deregistered from the I/O driver **and** there are no polls. The strategy in this PR is to let the I/O driver do the final release between polls, but I expect this strategy to evolve over time.
- Loading branch information
1 parent
0c7d8d1
commit b573adc
Showing
8 changed files
with
222 additions
and
1,037 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.