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

Add check_anywhere_queue_while_stealing meson option

parent 8338d9a2
No related branches found
No related tags found
1 merge request!207Add meson option for "check anywhere queue while stealing"
......@@ -78,6 +78,14 @@ static const bool OVERFLOW_QUEUE =
#endif
;
static const bool CHECK_ANYWHERE_QUEUE_WHILE_STEALING =
#ifdef EMPER_CHECK_ANYWHERE_QUEUE_WHILE_STEALING
true
#else
false
#endif
;
auto getFullVersion() -> std::string;
static const bool BLOCKED_CONTEXT_SET =
......
......@@ -205,6 +205,8 @@ popBottom:
auto stolenFiber = tryStealFiberFrom(victim);
if (stolenFiber) return *stolenFiber;
if constexpr (!emper::CHECK_ANYWHERE_QUEUE_WHILE_STEALING) continue;
// If we failed to steal from a certain number of victims, check
// the anywhere queue for new fibers.
if (i == checkAnywhereQueueAt) {
......
......@@ -37,6 +37,7 @@ conf_data.set('EMPER_WORKER_WAKEUP_STRATEGY', get_option('worker_wakeup_strategy
conf_data.set('EMPER_LOCKED_WS_QUEUE', get_option('locked_ws_queue'))
conf_data.set('EMPER_LOCKED_MPSC_QUEUE', get_option('locked_mpsc_queue'))
conf_data.set('EMPER_OVERFLOW_QUEUE', get_option('overflow_queue'))
conf_data.set('EMPER_CHECK_ANYWHERE_QUEUE_WHILE_STEALING', get_option('check_anywhere_queue_while_stealing'))
conf_data.set('EMPER_STATS', get_option('stats'))
conf_data.set('EMPER_OVERFLOW_QUEUE', get_option('overflow_queue'))
conf_data.set('EMPER_BLOCKED_CONTEXT_SET', get_option('blocked_context_set'))
......
......@@ -98,6 +98,12 @@ option(
value: true,
description: 'Use an overflow queue in case scheduling queues become full',
)
option(
'check_anywhere_queue_while_stealing',
type: 'boolean',
value: true,
description: 'Check the anywhere queue after some failed stealed attempts',
)
option(
'io',
type: 'boolean',
......
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