Specifically, it introduces a dedicated WaitQueue and Waiter objects that allow registering into a wait list before suspending.
Now, FiberInterface::wait_link was removed and fibers register via intrusive Waiter object on stack.
Moreover, the old approach of preventing the double booking int remote ready queue was removed and now we prevent double booking by unloading remote-ready queue in case the active fiber was added to it.
I also introduced an epoch-based notification mechanism, but I am not sure it's needed so I added LOG(FATAL) check to test it. We should notify exactly once based on the WaitQueue and we should not have dangling notifications, therefore I expect we won't have late notifications now.
The fix addresses #92
Specifically, it introduces a dedicated WaitQueue and Waiter objects that allow registering into a wait list before suspending. Now,
FiberInterface::wait_link
was removed and fibers register via intrusiveWaiter
object on stack.Moreover, the old approach of preventing the double booking int remote ready queue was removed and now we prevent double booking by unloading remote-ready queue in case the active fiber was added to it.
I also introduced an epoch-based notification mechanism, but I am not sure it's needed so I added
LOG(FATAL)
check to test it. We should notify exactly once based on the WaitQueue and we should not have dangling notifications, therefore I expect we won't have late notifications now.