From 6b7fb360568513807a005c6e513e00f2d2842ef4 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Wed, 29 Aug 2012 18:08:15 +0000 Subject: [PATCH] - scheduler: msg tweaks svn path=/trunk/boinc/; revision=26066 --- checkin_notes | 8 ++++++++ sched/handle_request.cpp | 13 ++++++++----- sched/sched_array.cpp | 13 ++++++++----- sched/sched_send.cpp | 2 ++ 4 files changed, 26 insertions(+), 10 deletions(-) diff --git a/checkin_notes b/checkin_notes index 67bffb0cf8..e058da1250 100644 --- a/checkin_notes +++ b/checkin_notes @@ -5791,3 +5791,11 @@ David 28 Aug 2012 sched_array.cpp lib/ str_util.cpp + +David 29 Aug 2012 + - scheduler: msg tweaks + + sched/ + sched_send.cpp + sched_array.cpp + handle_request.cpp diff --git a/sched/handle_request.cpp b/sched/handle_request.cpp index cb6c5ef4fa..98b65e40f2 100644 --- a/sched/handle_request.cpp +++ b/sched/handle_request.cpp @@ -1121,11 +1121,6 @@ void process_request(char* code_sign_key) { have_no_work = ssp->no_work(g_pid); if (have_no_work) { g_wreq->no_jobs_available = true; - if (config.debug_send) { - log_messages.printf(MSG_NORMAL, - "[send] No jobs in shmem\n" - ); - } } unlock_sema(); } @@ -1294,6 +1289,14 @@ void process_request(char* code_sign_key) { ok_to_send_work = false; } + if (have_no_work) { + if (config.debug_send) { + log_messages.printf(MSG_NORMAL, + "[send] No jobs in shmem cache\n" + ); + } + } + // if last RPC was within config.min_sendwork_interval, don't send work // if (!have_no_work && ok_to_send_work) { diff --git a/sched/sched_array.cpp b/sched/sched_array.cpp index 45b2dbd112..23a6c2d017 100644 --- a/sched/sched_array.cpp +++ b/sched/sched_array.cpp @@ -50,10 +50,6 @@ static bool quick_check( ) { int retval; - if (wu_result.state != WR_STATE_PRESENT && wu_result.state != g_pid) { - return false; - } - app = ssp->lookup_app(wu_result.workunit.appid); if (app == NULL) { log_messages.printf(MSG_CRITICAL, @@ -374,23 +370,30 @@ static bool scan_work_array() { WU_RESULT& wu_result = ssp->wu_results[i]; +#if 0 if (config.debug_array) { log_messages.printf(MSG_NORMAL, "[array] scanning slot %d\n", i ); } +#endif + // make a copy of the WORKUNIT part, // which we can modify without affecting the cache // WORKUNIT wu = wu_result.workunit; + if (wu_result.state != WR_STATE_PRESENT && wu_result.state != g_pid) { + continue; + } + // do fast (non-DB) checks. // This may modify wu.rsc_fpops_est // if (!quick_check(wu_result, wu, bavp, app, last_retval)) { if (config.debug_array) { log_messages.printf(MSG_NORMAL, - "[array] failed quick check\n" + "[array] slot %d failed quick check\n", i ); } continue; diff --git a/sched/sched_send.cpp b/sched/sched_send.cpp index c760b02735..f62c563873 100644 --- a/sched/sched_send.cpp +++ b/sched/sched_send.cpp @@ -1841,10 +1841,12 @@ void send_work_setup() { ); } } +#if 0 log_messages.printf(MSG_NORMAL, "[send] p_vm_extensions_disabled: %s\n", g_request->host.p_vm_extensions_disabled?"yes":"no" ); +#endif log_messages.printf(MSG_NORMAL, "[send] CPU features: %s\n", g_request->host.p_features );