Skip to content
Snippets Groups Projects
Commit b703fc1c authored by Florian Schmaus's avatar Florian Schmaus
Browse files

Add overflow feature to LAWS scheduler

parent 5e4ccead
No related branches found
No related tags found
No related merge requests found
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
#include "Common.hpp" #include "Common.hpp"
#include "Runtime.hpp" #include "Runtime.hpp"
#define EMPER_OVERFLOW_QUEUE
thread_local adt::MpscQueue<Fiber> priorityQueue; thread_local adt::MpscQueue<Fiber> priorityQueue;
thread_local LawsScheduler::WsQueue<LawsScheduler::QUEUE_SIZE> LawsScheduler::queue; thread_local LawsScheduler::WsQueue<LawsScheduler::QUEUE_SIZE> LawsScheduler::queue;
...@@ -34,7 +36,11 @@ void LawsScheduler::schedule(Fiber& fiber) { ...@@ -34,7 +36,11 @@ void LawsScheduler::schedule(Fiber& fiber) {
} }
bool pushed = queue.pushBottom(&fiber); bool pushed = queue.pushBottom(&fiber);
if (unlikely(!pushed)) { if (unlikely(!pushed)) {
abort(); #ifdef EMPER_OVERFLOW_QUEUE
priorityQueue.enqueue(&fiber);
#else
ABORT("Could not push fiber " << &fiber << " into queue");
#endif
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment