From fad7c4c182baf983fe908171bf2b7ff2263afb5e Mon Sep 17 00:00:00 2001 From: David Anderson Date: Tue, 11 Feb 2014 20:19:21 -0800 Subject: [PATCH] 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. --- client/app_control.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/client/app_control.cpp b/client/app_control.cpp index 7c52c0986f..2f69599937 100644 --- a/client/app_control.cpp +++ b/client/app_control.cpp @@ -821,7 +821,12 @@ bool ACTIVE_TASK_SET::check_rsc_limits_exceeded() { did_anything = true; continue; } - ram_left -= atp->procinfo.working_set_size_smoothed; + + // don't count RAM usage of non-CPU-intensive jobs + // + if (!atp->result->non_cpu_intensive()) { + ram_left -= atp->procinfo.working_set_size_smoothed; + } } if (ram_left < 0) { gstate.request_schedule_cpus("RAM usage limit exceeded");