diff --git a/checkin_notes b/checkin_notes index 747c6e8306..073f889934 100755 --- a/checkin_notes +++ b/checkin_notes @@ -5634,3 +5634,19 @@ Rom 31 May 2007 AccountManagerPropertiesPage.cpp BOINCDialupManager.cpp ProjectPropertiesPage.cpp + +David 31 May 2007 + - scheduler: move HR check to wu_is_infeasible() + In principle, a project can now use both + locality scheduling and homogeneous redundancy. + - scheduler: do HR check before deadline check, + since the latter is slower. + - scheduler: wu_is_infeasible() doesn't return a bitmap. + Change its return values to sequential numbers. + - scheduler: ignore and tags + + sched/ + sched_send.C,h + sched_array.C + sched_locality.C + server_types.C diff --git a/doc/boinc_news.php b/doc/boinc_news.php index 2e05349bba..8720b42b88 100644 --- a/doc/boinc_news.php +++ b/doc/boinc_news.php @@ -1,6 +1,14 @@ PS3GRID, + a BOINC-based project whose application + (molecular dynamics simulations) runs on the + PS3's Cell processor, on Linux." +), array("May 29, 2007", "Check out a video promoting BOINC on YouTube." ), diff --git a/sched/sched_array.C b/sched/sched_array.C index 15029515a7..9d5a3b8ce7 100644 --- a/sched/sched_array.C +++ b/sched/sched_array.C @@ -120,7 +120,7 @@ void scan_work_array( // don't send if host can't handle it // wu = wu_result.workunit; - retval = wu_is_infeasible(wu, sreq, reply); + retval = wu_is_infeasible(wu, sreq, reply, app); if (retval) { log_messages.printf( SCHED_MSG_LOG::MSG_DEBUG, "[HOST#%d] [WU#%d %s] WU is infeasible: %d\n", @@ -129,19 +129,6 @@ void scan_work_array( continue; } - // homogeneous redundancy, quick check - // - if (config.homogeneous_redundancy || app->homogeneous_redundancy) { - if (already_sent_to_different_platform_quick(sreq, wu)) { - log_messages.printf( - SCHED_MSG_LOG::MSG_DEBUG, - "[HOST#%d] [WU#%d %s] failed quick HR check: WU is class %d, host is class %d\n", - wu.hr_class, hr_class(sreq.host) - ); - continue; - } - } - // Find the app and app_version for the client's platform. // If none, treat the WU as infeasible // diff --git a/sched/sched_locality.C b/sched/sched_locality.C index b97577ba5d..d6505bb76b 100644 --- a/sched/sched_locality.C +++ b/sched/sched_locality.C @@ -288,21 +288,6 @@ static int possibly_send_result( retval = wu.lookup_id(result.workunitid); if (retval) return ERR_DB_NOT_FOUND; - // wu_is_infeasible() returns a bitmask of potential reasons - // why the WU is not feasible. These are defined in sched_send.h. - // INFEASIBLE_MEM, INFEASIBLE_DISK, INFEASIBLE_CPU. - // - if (wu_is_infeasible(wu, sreq, reply)) { - return ERR_INSUFFICIENT_RESOURCE; - } - - if (config.one_result_per_user_per_wu) { - sprintf(buf, "where userid=%d and workunitid=%d", reply.user.id, wu.id); - retval = result2.count(count, buf); - if (retval) return ERR_DB_NOT_FOUND; - if (count > 0) return ERR_WU_USER_RULE; - } - retval = get_app_version( wu, app, avp, sreq, reply, platforms, ss ); @@ -317,6 +302,21 @@ static int possibly_send_result( if (retval) return ERR_NO_APP_VERSION; + // wu_is_infeasible() returns the reason why the WU is not feasible; + // INFEASIBLE_MEM, INFEASIBLE_DISK, INFEASIBLE_CPU. + // see sched_send.h. + // + if (wu_is_infeasible(wu, sreq, reply, app)) { + return ERR_INSUFFICIENT_RESOURCE; + } + + if (config.one_result_per_user_per_wu) { + sprintf(buf, "where userid=%d and workunitid=%d", reply.user.id, wu.id); + retval = result2.count(count, buf); + if (retval) return ERR_DB_NOT_FOUND; + if (count > 0) return ERR_WU_USER_RULE; + } + return add_result_to_reply(result, wu, sreq, reply, platforms, app, avp); } diff --git a/sched/sched_send.C b/sched/sched_send.C index 6c9ff27d8f..3a4620a9c4 100644 --- a/sched/sched_send.C +++ b/sched/sched_send.C @@ -43,10 +43,11 @@ using namespace std; #include "main.h" #include "sched_array.h" #include "sched_msgs.h" -#include "sched_send.h" +#include "sched_hr.h" #include "sched_locality.h" #include "sched_timezone.h" +#include "sched_send.h" #ifdef _USING_FCGI_ #include "fcgi_stdio.h" @@ -422,10 +423,30 @@ static inline int check_deadline( // Should move a few other checks from sched_array.C // int wu_is_infeasible( - WORKUNIT& wu, SCHEDULER_REQUEST& request, SCHEDULER_REPLY& reply + WORKUNIT& wu, SCHEDULER_REQUEST& request, SCHEDULER_REPLY& reply, + APP* app ) { int retval; + + // homogeneous redundancy, quick check + // + if (config.homogeneous_redundancy || app->homogeneous_redundancy) { + if (already_sent_to_different_platform_quick(request, wu)) { + log_messages.printf( + SCHED_MSG_LOG::MSG_DEBUG, + "[HOST#%d] [WU#%d %s] failed quick HR check: WU is class %d, host is class %d\n", + reply.host.id, wu.id, wu.name, wu.hr_class, hr_class(request.host) + ); + return INFEASIBLE_HR; + } + } + if (config.one_result_per_user_per_wu || config.one_result_per_host_per_wu) { + if (wu_already_in_reply(wu, reply)) { + return INFEASIBLE_DUP; + } + } + retval = check_app_filter(wu, request, reply); if (retval) return retval; retval = check_memory(wu, request, reply); @@ -433,6 +454,8 @@ int wu_is_infeasible( retval = check_disk(wu, request, reply); if (retval) return retval; + // do this last because EDF sim uses some CPU + // if (config.workload_sim && request.have_other_results_list) { double est_cpu = estimate_cpu_duration(wu, reply); IP_RESULT candidate("", wu.delay_bound, est_cpu); @@ -447,16 +470,9 @@ int wu_is_infeasible( } } else { retval = check_deadline(wu, request, reply); - if (retval) return retval; + if (retval) return INFEASIBLE_WORKLOAD; } - if (config.one_result_per_user_per_wu || config.one_result_per_host_per_wu) { - if (wu_already_in_reply(wu, reply)) { - return -1; - } - } - - return 0; } diff --git a/sched/sched_send.h b/sched/sched_send.h index 3f8b49958e..8408257573 100644 --- a/sched/sched_send.h +++ b/sched/sched_send.h @@ -45,12 +45,16 @@ extern bool app_core_compatible(WORK_REQ& wreq, APP_VERSION& av); // #define INFEASIBLE_MEM 1 #define INFEASIBLE_DISK 2 -#define INFEASIBLE_CPU 4 -#define INFEASIBLE_WORK_BUF 8 -#define INFEASIBLE_APP_SETTING 16 -#define INFEASIBLE_WORKLOAD 32 +#define INFEASIBLE_CPU 3 +#define INFEASIBLE_WORK_BUF 4 +#define INFEASIBLE_APP_SETTING 5 +#define INFEASIBLE_WORKLOAD 6 +#define INFEASIBLE_DUP 7 +#define INFEASIBLE_HR 8 -extern int wu_is_infeasible(WORKUNIT&, SCHEDULER_REQUEST&, SCHEDULER_REPLY&); +extern int wu_is_infeasible( + WORKUNIT&, SCHEDULER_REQUEST&, SCHEDULER_REPLY&, APP* +); extern double max_allowable_disk(SCHEDULER_REQUEST&, SCHEDULER_REPLY&); diff --git a/sched/server_types.C b/sched/server_types.C index 847c600c22..e71265831c 100644 --- a/sched/server_types.C +++ b/sched/server_types.C @@ -882,10 +882,10 @@ int HOST::parse(FILE* fin) { // fields reported by 5.5+ clients, not currently used // else if (match_tag(buf, "")) continue; -#if 0 else if (match_tag(buf, "")) continue; else if (match_tag(buf, "")) continue; +#if 0 // not sure where thees fields belong in the above // categories //