Commit e6aef9ee authored by Florian Fischer's avatar Florian Fischer
Browse files

make cooperative task_work flag configurable

This is needed to measure its impact in the emper-fs-eval.
parent cc30c834
Pipeline #84579 failed with stages
in 15 minutes and 32 seconds
......@@ -161,6 +161,14 @@ const bool IO_NOTIFICATION =
#endif
;
const bool IO_URING_COOP_TASKRUN =
#ifdef EMPER_IO_URING_COOP_TASKRUN
true
#else
false
#endif
;
const bool IO_STEAL_ALL_ON_NOTIFICATION =
#ifdef EMPER_IO_STEAL_ALL_ON_NOTIFICATION
true
......
......@@ -608,8 +608,10 @@ IoContext::IoContext(Runtime &runtime, size_t uring_entries, unsigned unboundedI
* generated means io-stealing is less efficient since the time a cqe resides in
* a CQ is reduced.
*/
if (EMPER_LINUX_GE("5.19")) {
params.flags |= IORING_SETUP_COOP_TASKRUN | IORING_SETUP_TASKRUN_FLAG;
if constexpr (emper::IO_URING_COOP_TASKRUN) {
if (EMPER_LINUX_GE("5.19")) {
params.flags |= IORING_SETUP_COOP_TASKRUN | IORING_SETUP_TASKRUN_FLAG;
}
}
auto ret = io_uring_queue_init_params(uring_entries, &ring, &params);
......
......@@ -184,6 +184,7 @@ if option_io
endif
io_bool_options = [
{'option': 'uring_coop_taskrun'},
{'option': 'stealing'},
{'option': 'lockless_cq'},
{'option': 'single_uring',
......
......@@ -257,6 +257,12 @@ option(
value: false,
description: 'Try non blocking syscalls before submitting the request to io_uring'
)
option(
'io_uring_coop_taskrun',
type: 'boolean',
value: true,
description: 'Set io_uring TASKRUN flags to use cooperative task_work'
)
option(
'io_worker_uring_entries',
type: 'integer',
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment