Skip to content
Snippets Groups Projects
Commit 388bd882 authored by Florian Fischer's avatar Florian Fischer
Browse files

[IO] use our affinity capabilities in the io subsystem

Set the affinity for Fibers created from the completer thread
to the workerId where the completion originated from.

First, we split up the Callback type in a user facing and an internal one.
The internal one has a new affinity member which provides the memory for
the new Fibers affinity buffer. This is memory safe because the Callback
object is always heap allocated and freed when the CallbackFiber terminates.

Second, each Future has an affinity member as well which will be passed
to the BinaryPrivateSemaphore when calling signalFromAnywhere to
again hint the originating worker.

Both affinity values are set during the preparation of the Future in
IoContext::prepareFutureChain because then we are sure in which worker's
IoContext the completion will be generated.
parent 5b1c238e
No related branches found
No related tags found
1 merge request!188[IO] set the affinity of Fibers created by the completer thread
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment