*** empty log message ***

svn path=/trunk/boinc/; revision=11981
This commit is contained in:
David Anderson 2007-01-26 18:38:17 +00:00
parent 01aeb307ce
commit 47f8a509fe
7 changed files with 61 additions and 22 deletions

View File

@ -1241,3 +1241,21 @@ Rom 26 Jan 2007
win_build/
boincmgr_curl.vcproj
boincmgr_curl_2003.vcproj
David 26 Jan 2007
- core client: another attempt at fixing the problem
where a project is issuing work but not uploading files.
New solution: don't fetch work from a project with
more than 2*ncpus results in FILES_UPLOADING state.
Note: this doesn't address John McLeod's point that
we shouldn't increase LTD for projects in this state.
- file upload handler: print more accurate message when
fread() returns less than requested
client/
client_state.h
cpu_sched.C
cs_scheduler.C
sched/
file_upload_handler.C

View File

@ -389,6 +389,7 @@ private:
int proj_min_results(PROJECT*, double);
void generate_new_host_cpid();
void check_project_timeout();
void compute_nuploading_results();
// --------------- cs_statefile.C:
public:

View File

@ -136,14 +136,6 @@ void CLIENT_STATE::assign_results_to_projects() {
project = rp->project;
if (project->next_runnable_result) continue;
// don't start results if project has > 2*ncpus uploading results.
// This avoids creating an unbounded number of completed
// results for a project that can download and compute
// faster than it can upload.
//
if (project->nuploading_results > 2*ncpus) continue;
project->next_runnable_result = rp;
}
@ -439,15 +431,8 @@ void CLIENT_STATE::schedule_cpus() {
for (i=0; i<projects.size(); i++) {
p = projects[i];
p->next_runnable_result = NULL;
p->nuploading_results = 0;
p->anticipated_debt = p->short_term_debt;
p->deadlines_missed = p->rr_sim_deadlines_missed;
}
for (i=0; i<results.size(); i++) {
RESULT* rp = results[i];
if (rp->state() == RESULT_FILES_UPLOADING) {
rp->project->nuploading_results++;
}
}
for (i=0; i<active_tasks.active_tasks.size(); i++) {
active_tasks.active_tasks[i]->too_large = false;

View File

@ -711,6 +711,12 @@ bool CLIENT_STATE::compute_work_requests() {
}
continue;
}
if (p->nuploading_results > 2*ncpus) {
if (log_flags.work_fetch_debug) {
msg_printf(p, MSG_INFO, "[work_fetch_debug] project has %d uploading results", p->nuploading_results);
}
continue;
}
// see if this project is better than our current best
//
@ -1337,4 +1343,19 @@ void CLIENT_STATE::generate_new_host_cpid() {
}
}
void CLIENT_STATE::compute_nuploading_results() {
unsigned int i;
for (i=0; i<projects.size(); i++) {
projects[i]->nuploading_results = 0;
}
for (i=0; i<results.size(); i++) {
RESULT* rp = results[i];
if (rp->state() == RESULT_FILES_UPLOADING) {
rp->project->nuploading_results++;
}
}
}
const char *BOINC_RCSID_d35a4a7711 = "$Id$";

View File

@ -109,6 +109,7 @@ Write a simulator for the CPU scheduler and work fetch policies
<li> Prevent disk space usage from exceeding user preferences,
and enforce resource shares,
with file deletion according to project policy.
<li> Make messages of class MSG_USER_ERROR translatable.
</ul>
<li> BOINC Manager:

View File

@ -31,7 +31,7 @@ Usually this is en.po (English).
<li>
Create a translation file for your language.
You can do this using a text editor or a specialized tool such as
<a href=http://www.poedit.org/>poedit</a>.
<a href=http://sourceforge.net/projects/poedit/>poedit</a>.
<li>
Send this to the translation manager,
who will then install it on the project's web site.

View File

@ -201,14 +201,13 @@ int copy_socket_to_file(FILE* in, char* path, double offset, double nbytes) {
while (bytes_left > 0) {
int n, m, to_write, errno_save;
int n, m, to_write;
m = bytes_left<(double)BLOCK_SIZE ? (int)bytes_left : BLOCK_SIZE;
// try to get m bytes from socket (n>=0 is number actually returned)
//
n = fread(buf, 1, m, in);
errno_save=errno;
// try to write n bytes to file
//
@ -225,13 +224,27 @@ int copy_socket_to_file(FILE* in, char* path, double offset, double nbytes) {
}
// check that we got all bytes from socket that were requested
// Note: fread() reads less than requested only if there's
// an error or EOF (see the man page)
//
if (n != m) {
close(fd);
return return_error(ERR_TRANSIENT,
"socket read incomplete: asked for %d, got %d: %s\n",
m, n, strerror(errno_save)
);
if (feof(in)) {
return return_error(ERR_TRANSIENT,
"EOF on socket read : asked for %d, got %d\n",
m, n
);
} else if (ferror(in)) {
return return_error(ERR_TRANSIENT,
"error %d (%s) on socket read: asked for %d, got %d\n",
ferror(in), strerror(ferror(in)), m, n
);
} else {
return return_error(ERR_TRANSIENT,
"incomplete socket read: asked for %d, got %d\n",
m, n
);
}
}
bytes_left -= n;