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

use IORING_OP_MSG_RING instead of eventfds to notify specific

With Linux 5.18 io_uring supports sending notifications between io_urings.
This removes the need of writing to a specific eventfd to notify
specific sleeping workers.
This greatly reduces the complexity of the sued algorithm because
we do not longer need to prepare two sleeps in an atomic way.

The notify specific algorithm no can be similar to the one used by the
semaphore implementation.
The notifier sets the state of the specific worker to Notified and
if its was previously sleeping it is responsible to send a wakeup
message.

When a worker is going to sleep it sets its state to Running if
it was notified the state is reset and the sleep attempt skipped.
Otherwise a global read is prepared if needed and the worker waits
on its io_uring.
parent 308613e3
No related branches found
No related tags found
No related merge requests found
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