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

reduce log level for io_uring_submit -> -EBUSY message and fix TIME_NS

TIME_NS was never expanded because emper-config.h was not included
in Common.hpp.

The log_level is reduced from Info to Debug because the IoContext reqs_in_uring
has only in debug builds a meaningful value.
And the fact that there where a full CQ during io_uring_submit is captured in the stats
anyway.

Don't record a full CQ before dying in the completer.
parent 455fc766
No related branches found
No related tags found
1 merge request!144reduce log level for io_uring_submit -> -EBUSY message and fix TIME_NS
......@@ -5,6 +5,8 @@
#include <functional>
#include <sstream> // IWYU pragma: keep
#include "emper-config.h" // IWYU pragma: keep
using func_t = std::function<void()>;
#define STRINGIFY(x) #x
......
......@@ -99,12 +99,11 @@ auto IoContext::submitPreparedSqes() -> unsigned {
// in worker thread -> reapCompletions
// in globalCompleter thread -> TODO: deterministically handle global full CQ
// for now hope a jam does not happen or will solve itself
LOGGER_LOGI("io_submit returned EBUSY trying to submit "
<< io_uring_sq_ready(&ring) << " in addition to " << reqs_in_uring);
LOGD("io_submit returned EBUSY trying to submit " << io_uring_sq_ready(&ring)
<< " in addition to " << reqs_in_uring);
if constexpr (callerEnvironment == CallerEnvironment::ANYWHERE) {
// we are not busy looping in the globalIo
stats.record_io_submit_full_cq();
DIE_MSG("Future dropped because global completer SQ is full");
}
......
......@@ -203,7 +203,7 @@ class Stats {
// running mean calculation taken from
// https://math.stackexchange.com/questions/106700/incremental-averageing
inline void record_io_submit_full_cq(nanoseconds ns = std::chrono::nanoseconds(0)) {
inline void record_io_submit_full_cq(nanoseconds ns) {
RETURN_IF_NO_STATS();
io_submit_full_cq++;
......
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