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

Merge branch 'ignore-new-work-hints' into 'master'

[meson] add option to ignore wakeup hints

See merge request i4/manycore/emper!316
parents b7fc3b20 7f6fb152
Branches
Tags
No related merge requests found
...@@ -61,6 +61,14 @@ enum class WorkerWakeupStrategy { ...@@ -61,6 +61,14 @@ enum class WorkerWakeupStrategy {
static const enum WorkerWakeupStrategy WORKER_WAKEUP_STRATEGY = static const enum WorkerWakeupStrategy WORKER_WAKEUP_STRATEGY =
WorkerWakeupStrategy::EMPER_WORKER_WAKEUP_STRATEGY; WorkerWakeupStrategy::EMPER_WORKER_WAKEUP_STRATEGY;
static const bool WORKER_IGNORE_WAKEUP_HINT =
#ifdef EMPER_WORKER_IGNORE_WAKEUP_HINT
true
#else
false
#endif
;
static const bool LIBURCU = static const bool LIBURCU =
#ifdef EMPER_LIBURCU #ifdef EMPER_LIBURCU
true true
......
...@@ -184,6 +184,10 @@ popBottom: ...@@ -184,6 +184,10 @@ popBottom:
auto* const currentWorker = Worker::getCurrentWorker(); auto* const currentWorker = Worker::getCurrentWorker();
if constexpr (emper::WORKER_IGNORE_WAKEUP_HINT) {
goto work_stealing;
}
// Try dispatch hint possibly set by the sleep strategy // Try dispatch hint possibly set by the sleep strategy
if (currentWorker->dispatchHint) { if (currentWorker->dispatchHint) {
const emper::FiberHint dispatchHint = currentWorker->dispatchHint; const emper::FiberHint dispatchHint = currentWorker->dispatchHint;
...@@ -214,6 +218,7 @@ popBottom: ...@@ -214,6 +218,7 @@ popBottom:
} }
} }
work_stealing:
// Go into work stealing // Go into work stealing
// TODO: Determine if there is a better value than 1/3. // TODO: Determine if there is a better value than 1/3.
const float CHECK_ANYWHERE_QUEUE_AT_PERCENTAGE = 0.33; const float CHECK_ANYWHERE_QUEUE_AT_PERCENTAGE = 0.33;
......
...@@ -49,6 +49,7 @@ endif ...@@ -49,6 +49,7 @@ endif
conf_data.set('EMPER_WORKER_SLEEP', get_option('worker_sleep')) conf_data.set('EMPER_WORKER_SLEEP', get_option('worker_sleep'))
conf_data.set('EMPER_WORKER_WAKEUP_STRATEGY', get_option('worker_wakeup_strategy')) conf_data.set('EMPER_WORKER_WAKEUP_STRATEGY', get_option('worker_wakeup_strategy'))
conf_data.set('EMPER_WORKER_IGNORE_WAKEUP_HINT', get_option('worker_ignore_wakeup_hint'))
conf_data.set('EMPER_LOCKED_WS_QUEUE', get_option('locked_ws_queue')) 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_LOCKED_MPSC_QUEUE', get_option('locked_mpsc_queue'))
conf_data.set('EMPER_OVERFLOW_QUEUE', get_option('overflow_queue')) conf_data.set('EMPER_OVERFLOW_QUEUE', get_option('overflow_queue'))
......
...@@ -65,6 +65,12 @@ option( ...@@ -65,6 +65,12 @@ option(
value: 'posix', value: 'posix',
description: 'Semaphore implementation to suspend/wakeup workers', description: 'Semaphore implementation to suspend/wakeup workers',
) )
option(
'worker_ignore_wakeup_hint',
type: 'boolean',
description: 'Should possibly passed hints where to find new work be ignored',
value: false,
)
option( option(
'locked_ws_queue', 'locked_ws_queue',
type: 'boolean', type: 'boolean',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment