diff --git a/src/runtime/BaseProcessor.cc b/src/runtime/BaseProcessor.cc index 989b08c4d8fb037ae6376a21965aee749758ff45..cb175c50d7837e2a40210258cc298f73d0efa514 100644 --- a/src/runtime/BaseProcessor.cc +++ b/src/runtime/BaseProcessor.cc @@ -17,7 +17,7 @@ #include "runtime/Cluster.h" #include "runtime/RuntimeImpl.h" -// from background enqueue -> find idle "real" processor to run +// from background & staging enqueue -> find idle "real" processor to run void VirtualProcessor::wakeUp() { BaseProcessor* idleProc = cluster.findIdleProcessorHard(); GENASSERT1(idleProc != this, FmtHex(this)); @@ -26,8 +26,10 @@ void VirtualProcessor::wakeUp() { // any other enqueue -> wake idle processor, but don't try too hard void VirtualProcessor::wakeCluster() { +#if TESTING_WAKE_CLUSTER BaseProcessor* idleProc = cluster.findIdleProcessorSoft(); if (idleProc && idleProc != this) idleProc->wakeUp(); +#endif } BaseProcessor::BaseProcessor(Cluster& c) : VirtualProcessor(c, "Processor"), terminate(false), idleStack(nullptr) { diff --git a/src/testoptions.h b/src/testoptions.h index 82b4b4038942801220423613b96596f4335569e0..1b9e5e06bec918cce589da677fd363f234a97d58 100644 --- a/src/testoptions.h +++ b/src/testoptions.h @@ -22,6 +22,7 @@ //#define TESTING_MUTEX_FIFO 1 // use fifo/baton mutex //#define TESTING_MUTEX_SPIN 1 // spin before block in non-fifo mutex //#define TESTING_PLACEMENT_RR 1 // RR placement, instead of load-based +#define TESTING_WAKE_CLUSTER 1 // try waking idle processor on cluster backlog #define TESTING_WORK_STEALING 1 // enable work stealing (default transient) #define TESTING_WORK_STEALING_STICKY 5 // sticky work stealing load threshold