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

waitfd: make punting the waitfd read configurable

parent ae890661
Pipeline #81287 failed with stages
in 21 minutes and 38 seconds
......@@ -161,6 +161,14 @@ const bool IO_NOTIFICATION =
#endif
;
const bool IO_PUNT_WAITFD_READ =
#ifdef EMPER_IO_PUNT_WAITFD_READ
true
#else
false
#endif
;
const bool IO_STEALING =
#ifdef EMPER_IO_STEALING
true
......
......@@ -61,7 +61,9 @@ void WaitfdSleepStrategy::sleep() {
auto customLogic = [this, &io] {
// waitfd non-blocking reads will always return -EAGAIN and waitfd is not pollable
// therefore we can skip that and immediately issue the read in an async manner.
prepareSleepRead(io, waitfd, IOSQE_ASYNC);
uint8_t sqe_flags = 0;
if constexpr (emper::IO_PUNT_WAITFD_READ) sqe_flags |= IOSQE_ASYNC;
prepareSleepRead(io, waitfd, sqe_flags);
LOGD("prepared waitfd read");
return true;
};
......
......@@ -194,6 +194,8 @@ io_bool_options = [
{'option': 'notification',
'dependencies': {'worker_sleep_strategy': 'waitfd'}},
{'option': 'synchronous'},
{'option': 'punt_waitfd_read',
'dependencies': {'worker_sleep_strategy': 'waitfd'}},
]
io_raw_options = [
......
......@@ -73,6 +73,12 @@ option(
choices: ['none', 'accounting', 'waitFree', 'bestEffort'],
value: 'none',
)
option(
'io_punt_waitfd_read',
type: 'boolean',
description: 'Punt the sleep watfd read to the io_wq',
value: false,
)
option(
'wakeup_semaphore_implementation',
type: 'combo',
......
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