*** empty log message ***

svn path=/trunk/boinc/; revision=8913
This commit is contained in:
David Anderson 2005-11-23 03:23:13 +00:00
parent 7adccd96d7
commit eb10de5e40
2 changed files with 26 additions and 7 deletions

View File

@ -13824,3 +13824,12 @@ David 22 Nov 2005
html/user/
host_edit_action.php
David 22 Nov 2005
- core client: fix bug where only 1 app would have its disk space
check against limit.
Also, do the check every 5 min instead of 1 min
(from Walt Gribben)
client/
app_control.C

View File

@ -503,19 +503,29 @@ bool ACTIVE_TASK_SET::check_rsc_limits_exceeded() {
unsigned int j;
ACTIVE_TASK *atp;
static double last_disk_check_time = 0;
bool do_disk_check = false;
bool did_anything = false;
// disk_interval is typically 60 sec,
// and some slot dirs have lots of files.
// So only check every 5*disk_interval
//
if (gstate.now > last_disk_check_time + 5*gstate.global_prefs.disk_interval) {
do_disk_check = true;
}
for (j=0;j<active_tasks.size();j++) {
atp = active_tasks[j];
if (atp->task_state != PROCESS_EXECUTING) continue;
if (atp->check_max_cpu_exceeded()) return true;
else if (atp->check_max_mem_exceeded()) return true;
else if (gstate.now>last_disk_check_time + gstate.global_prefs.disk_interval) {
last_disk_check_time = gstate.now;
if (atp->check_max_disk_exceeded()) return true;
if (atp->check_max_cpu_exceeded()) did_anything = true;
else if (atp->check_max_mem_exceeded()) did_anything = true;
else if (do_disk_check && atp->check_max_disk_exceeded()) {
did_anything = true;
}
}
return false;
if (do_disk_check) {
last_disk_check_time = gstate.now;
}
return did_anything;
}
// If process is running, send it a kill signal