cachegrand icon indicating copy to clipboard operation
cachegrand copied to clipboard

Optimize fibers scheduling in the io_uring-based I/O interface

Open danielealbano opened this issue 4 years ago • 0 comments

The fiber solution implemented in cachegrand comes with extra complexity and security concerns, although some of these issues have already been addressed (e.g. stack guards), there is also room for wide improvements.

Currently the fiber scheduler implemented in the io_uring I/O interface switch to a client fiber back to the scheduler fiber, this second switch can be entirely avoided if the context of the scheduler is kept on the thread (e.g. with a local thread context) instead that on the stack, de-facto halving the execution time from about 20ns to about 10ns.

danielealbano avatar Dec 26 '21 12:12 danielealbano