Client: fix bug that caused spurious "Request CPU reschedule: RAM usage limit exceeded"

Problem: we were ignoring the RAM usage of non-CPU-intensive jobs
when scheduling jobs,
but counting it when deciding whether a reschedule is needed.
Ignore it both places.
This commit is contained in:
David Anderson 2014-02-11 20:19:21 -08:00
parent 6618cfd4c5
commit fad7c4c182
1 changed files with 6 additions and 1 deletions

View File

@ -821,8 +821,13 @@ bool ACTIVE_TASK_SET::check_rsc_limits_exceeded() {
did_anything = true; did_anything = true;
continue; continue;
} }
// don't count RAM usage of non-CPU-intensive jobs
//
if (!atp->result->non_cpu_intensive()) {
ram_left -= atp->procinfo.working_set_size_smoothed; ram_left -= atp->procinfo.working_set_size_smoothed;
} }
}
if (ram_left < 0) { if (ram_left < 0) {
gstate.request_schedule_cpus("RAM usage limit exceeded"); gstate.request_schedule_cpus("RAM usage limit exceeded");
} }