Skip to content
Snippets Groups Projects

load CQ->tail only once during lockless stealing

Merged Florian Fischer requested to merge aj46ezos/emper:optimize-lockless-stealing into master
Files
2
+ 6
0
@@ -413,6 +413,12 @@ class IoContext : public Logger<LogSubsystem::IO> {
return reapCompletionsLockless<callerEnvironment>(continuations, toReap);
}
// CallerEnvironment::EMPER means we are in a stealing worker.
// Check if the victim's CQ is empty before taking the lock.
if constexpr (callerEnvironment == CallerEnvironment::EMPER) {
if (!cqeCount()) return 0;
}
return reapCompletionsLocked<callerEnvironment>(continuations, toReap);
}
Loading