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

[AbstractWorkStealingScheduler] Emit warning if queue is full

In case pushing to the local work-stealing queue fails because the
queue is full, and that failure is not fatal as it is in Fibril, emit
a warning once.
parent d875fdba
No related branches found
No related tags found
No related merge requests found
...@@ -294,6 +294,9 @@ auto AbstractWorkStealingScheduler::pushBottom(AbstractFiber& fiber) -> bool { ...@@ -294,6 +294,9 @@ auto AbstractWorkStealingScheduler::pushBottom(AbstractFiber& fiber) -> bool {
uint64_t queueLength = pushed.size; uint64_t queueLength = pushed.size;
awss::stats.recordScheduledToLocalAndQueueLength(queueLength); awss::stats.recordScheduledToLocalAndQueueLength(queueLength);
} }
} else if (!queueFullWarningEmitted) {
queueFullWarningEmitted = true;
LOGW("Pushing to queue failed: Queue full");
} }
return pushed; return pushed;
} }
...@@ -28,6 +28,8 @@ class AbstractWorkStealingScheduler : public Scheduler { ...@@ -28,6 +28,8 @@ class AbstractWorkStealingScheduler : public Scheduler {
auto nextFiberViaAnywhereQueue() -> std::optional<NextFiberResult>; auto nextFiberViaAnywhereQueue() -> std::optional<NextFiberResult>;
auto tryStealFiberFrom(workerid_t victim) -> std::optional<NextFiberResult>; auto tryStealFiberFrom(workerid_t victim) -> std::optional<NextFiberResult>;
bool queueFullWarningEmitted = false;
protected: protected:
WsQueue<QUEUE_SIZE>** queues; WsQueue<QUEUE_SIZE>** queues;
static thread_local WsQueue<QUEUE_SIZE> queue; static thread_local WsQueue<QUEUE_SIZE> queue;
......
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