diff --git a/checkin_notes b/checkin_notes index 55041e27f5..8319256084 100755 --- a/checkin_notes +++ b/checkin_notes @@ -15617,3 +15617,11 @@ Rom 22 July 2004 sched/ transitioner.C +Daniel 2004-07-22 + - use "estimated_delay" (sent in scheduler request by client) when + trying to meet wu.delay_bound. + + sched/ + sched_send.C + server_types.C,h + diff --git a/sched/sched_send.C b/sched/sched_send.C index eba40047da..f06cfa26ca 100644 --- a/sched/sched_send.C +++ b/sched/sched_send.C @@ -139,7 +139,7 @@ inline double estimate_cpu_duration(WORKUNIT& wu, HOST& host) { return wu.rsc_fpops_est/host.p_fpops; } -// estimate the amount of real time for this WU based on active_frac +// estimate the amount of real time for this WU based on active_frac, // and resource_share_fraction inline double estimate_wallclock_duration( WORKUNIT& wu, HOST& host, double resource_share_fraction @@ -153,7 +153,8 @@ inline double estimate_wallclock_duration( // because of insufficient memory, CPU speed, or resource share // bool wu_is_feasible( - WORKUNIT& wu, HOST& host, WORK_REQ& wreq, double resource_share_fraction + WORKUNIT& wu, HOST& host, WORK_REQ& wreq, + double resource_share_fraction, double estimated_delay ) { double m_nbytes = host.m_nbytes; if (m_nbytes < MIN_POSSIBLE_RAM) m_nbytes = MIN_POSSIBLE_RAM; @@ -168,8 +169,9 @@ bool wu_is_feasible( } if (config.enforce_delay_bound) { - double wu_wallclock_time = estimate_wallclock_duration(wu, host, resource_share_fraction); - int host_remaining_time = 0; // TODO + double wu_wallclock_time = + estimate_wallclock_duration(wu, host, resource_share_fraction); + double host_remaining_time = estimated_delay; if (host_remaining_time + wu_wallclock_time > wu.delay_bound) { log_messages.printf( @@ -520,7 +522,8 @@ static void scan_work_array( // wu = wu_result.workunit; if (!wu_is_feasible( - wu, reply.host, wreq, sreq.resource_share_fraction + wu, reply.host, wreq, sreq.resource_share_fraction, + sreq.estimated_delay )) { log_messages.printf( SCHED_MSG_LOG::DEBUG, "[HOST#%d] [WU#%d %s] WU is infeasible\n", diff --git a/sched/server_types.C b/sched/server_types.C index 8a3e4a7172..eb5760be1e 100644 --- a/sched/server_types.C +++ b/sched/server_types.C @@ -62,6 +62,7 @@ int SCHEDULER_REQUEST::parse(FILE* fin) { hostid = 0; work_req_seconds = 0; resource_share_fraction = 1.0; + estimated_delay = 0; strcpy(global_prefs_xml, ""); strcpy(projects_xml, ""); strcpy(code_sign_key, ""); @@ -91,6 +92,7 @@ int SCHEDULER_REQUEST::parse(FILE* fin) { else if (parse_int(buf, "", core_client_minor_version)) continue; else if (parse_int(buf, "", work_req_seconds)) continue; else if (parse_double(buf, "", resource_share_fraction)) continue; + else if (parse_double(buf, "", estimated_delay)) continue; else if (parse_double(buf, "", project_disk_usage)) continue; else if (parse_double(buf, "", total_disk_usage)) continue; else if (match_tag(buf, "")) { diff --git a/sched/server_types.h b/sched/server_types.h index 13060a1e47..777a3663de 100644 --- a/sched/server_types.h +++ b/sched/server_types.h @@ -62,6 +62,7 @@ struct SCHEDULER_REQUEST { int rpc_seqno; int work_req_seconds; double resource_share_fraction; + double estimated_delay; char global_prefs_xml[LARGE_BLOB_SIZE]; char projects_xml[LARGE_BLOB_SIZE]; char code_sign_key[4096];