mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=11494
This commit is contained in:
parent
6756c75ad5
commit
92a34648a6
|
@ -12385,11 +12385,29 @@ David 7 Nov 2006
|
|||
validate_util.C
|
||||
|
||||
Rom 7 Nov 2006
|
||||
- MGR: David and I got our wires cross, the global prefs mask is now set for all
|
||||
values in the preferences dialog when the selection has been made to override
|
||||
anything.
|
||||
- MGR: David and I got our wires cross,
|
||||
the global prefs mask is now set for all
|
||||
values in the preferences dialog when the selection
|
||||
has been made to override anything.
|
||||
|
||||
clientgui/
|
||||
sg_DlgPreferences.cpp, .h
|
||||
|
||||
David 7 Nov 2006
|
||||
- core client: call request_work_fetch() whenever a
|
||||
process becomes contactable
|
||||
(i.e. when its min_rpc_time times out).
|
||||
This can avoid 10-minute periods of waiting
|
||||
for the work fetch function to get called
|
||||
|
||||
Implementation: add bool PROJECT::possibly_backed_off;
|
||||
set to true in set_min_rpc_time();
|
||||
check for timeout in check_project_timeout()
|
||||
|
||||
client/
|
||||
client_state.C,h
|
||||
client_types.C,h
|
||||
cpu_sched.C
|
||||
cs_scheduler.C
|
||||
lib/
|
||||
miofile.C
|
||||
|
|
|
@ -481,6 +481,7 @@ bool CLIENT_STATE::poll_slow_events() {
|
|||
// and handle_finished_apps() must be done before possibly_schedule_cpus()
|
||||
|
||||
ss_logic.poll();
|
||||
check_project_timeout();
|
||||
POLL_ACTION(active_tasks , active_tasks.poll );
|
||||
POLL_ACTION(garbage_collect , garbage_collect );
|
||||
POLL_ACTION(update_results , update_results );
|
||||
|
|
|
@ -385,6 +385,7 @@ private:
|
|||
bool should_get_work();
|
||||
int proj_min_results(PROJECT*, double);
|
||||
void generate_new_host_cpid();
|
||||
void check_project_timeout();
|
||||
|
||||
// --------------- cs_statefile.C:
|
||||
public:
|
||||
|
|
|
@ -75,6 +75,7 @@ void PROJECT::init() {
|
|||
nrpc_failures = 0;
|
||||
master_fetch_failures = 0;
|
||||
min_rpc_time = 0;
|
||||
possibly_backed_off = true;
|
||||
master_url_fetch_pending = false;
|
||||
sched_rpc_pending = 0;
|
||||
next_rpc_time = 0;
|
||||
|
|
|
@ -215,6 +215,7 @@ public:
|
|||
double next_rpc_time;
|
||||
// if nonzero, specifies a time when another scheduler RPC
|
||||
// should be done (as requested by server)
|
||||
bool possibly_backed_off;
|
||||
bool trickle_up_pending; // have trickle up to send
|
||||
bool tentative; // we haven't done a scheduler RPC to this project yet
|
||||
// (still need to verify that its name isn't a dup)
|
||||
|
|
|
@ -441,6 +441,9 @@ void CLIENT_STATE::schedule_cpus() {
|
|||
fxp->fip->project->nactive_uploads++;
|
||||
}
|
||||
}
|
||||
for (i=0; i<active_tasks.active_tasks.size(); i++) {
|
||||
active_tasks.active_tasks[i]->too_large = false;
|
||||
}
|
||||
|
||||
adjust_debts();
|
||||
|
||||
|
|
|
@ -58,11 +58,6 @@ using std::string;
|
|||
//
|
||||
#define EXP_DECAY_RATE (1./(SECONDS_PER_DAY*7))
|
||||
|
||||
// how often to show user "backing off" messages
|
||||
//
|
||||
const int SECONDS_BEFORE_REPORTING_MIN_RPC_TIME_AGAIN = 60*60;
|
||||
|
||||
|
||||
// try to report results this much before their deadline
|
||||
//
|
||||
#define REPORT_DEADLINE_CUSHION ((double)SECONDS_PER_DAY)
|
||||
|
@ -88,9 +83,21 @@ int CLIENT_STATE::proj_min_results(PROJECT* p, double subset_resource_share) {
|
|||
return (int)(ceil(ncpus*p->resource_share/subset_resource_share));
|
||||
}
|
||||
|
||||
void CLIENT_STATE::check_project_timeout() {
|
||||
unsigned int i;
|
||||
for (i=0; i<projects.size(); i++) {
|
||||
PROJECT* p = projects[i];
|
||||
if (p->possibly_backed_off && now > p->min_rpc_time) {
|
||||
p->possibly_backed_off = false;
|
||||
request_work_fetch("Project backoff ended");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void PROJECT::set_min_rpc_time(double future_time) {
|
||||
if (future_time > min_rpc_time) {
|
||||
min_rpc_time = future_time;
|
||||
possibly_backed_off = true;
|
||||
msg_printf(this, MSG_INFO,
|
||||
"Deferring scheduler requests for %s\n",
|
||||
timediff_format(min_rpc_time - gstate.now).c_str()
|
||||
|
@ -926,7 +933,7 @@ int CLIENT_STATE::handle_scheduler_reply(
|
|||
if (sr.project_is_down) {
|
||||
if (sr.request_delay) {
|
||||
double x = gstate.now + sr.request_delay;
|
||||
if (x > project->min_rpc_time) project->min_rpc_time = x;
|
||||
project->set_min_rpc_time(x);
|
||||
}
|
||||
return ERR_PROJECT_DOWN;
|
||||
}
|
||||
|
@ -1208,7 +1215,7 @@ int CLIENT_STATE::handle_scheduler_reply(
|
|||
//
|
||||
if (sr.request_delay) {
|
||||
double x = gstate.now + sr.request_delay;
|
||||
if (x > project->min_rpc_time) project->min_rpc_time = x;
|
||||
project->set_min_rpc_time(x);
|
||||
} else {
|
||||
project->min_rpc_time = 0;
|
||||
}
|
||||
|
@ -1284,7 +1291,7 @@ void CLIENT_STATE::generate_new_host_cpid() {
|
|||
for (unsigned int i=0; i<projects.size(); i++) {
|
||||
if (projects[i]->attached_via_acct_mgr) {
|
||||
projects[i]->sched_rpc_pending = RPC_REASON_ACCT_MGR_REQ;
|
||||
projects[i]->min_rpc_time = now + 15;
|
||||
projects[i]->set_min_rpc_time(now + 15);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -79,7 +79,7 @@ char* MIOFILE::fgets(char* dst, int len) {
|
|||
if (f) {
|
||||
return ::fgets(dst, len, f);
|
||||
}
|
||||
char* q = strchr(buf, '\n');
|
||||
const char* q = strchr(buf, '\n');
|
||||
if (!q) return 0;
|
||||
|
||||
q++;
|
||||
|
|
Loading…
Reference in New Issue