diff --git a/client/client_state.h b/client/client_state.h index c1d00a8a27..4e8294762f 100644 --- a/client/client_state.h +++ b/client/client_state.h @@ -62,6 +62,12 @@ using std::vector; #include "../sched/edf_sim.h" #endif +#define WF_EST_FETCH_TIME 180 + // Figure that fetching work (possibly requesting from several projects) + // could take as long as this. + // So start work fetch this long before an instance becomes idle, + // in order to avoid idleness. + // encapsulates the global variables of the core client. // If you add anything here, initialize it in the constructor // @@ -589,7 +595,6 @@ extern THREAD throttle_thread; // don't fetch work from a project if it has this many runnable jobs. // This is a failsafe mechanism to prevent infinite fetching - //////// CPU SCHEDULING #define CPU_SCHED_PERIOD 60 diff --git a/client/work_fetch.cpp b/client/work_fetch.cpp index ff0ff06ecf..c574275628 100644 --- a/client/work_fetch.cpp +++ b/client/work_fetch.cpp @@ -115,7 +115,7 @@ RSC_REASON RSC_PROJECT_WORK_FETCH::compute_rsc_project_reason( // only fetch work if a device is idle // if (p->resource_share == 0 && rwf.saturated_time > WF_EST_FETCH_TIME) { - return DONT_FETCH_ZERO_SHARE; + return RSC_REASON_ZERO_SHARE; } // if project has excluded GPUs of this type,