diff --git a/checkin_notes b/checkin_notes index 2107da7c75..5b8cee22e0 100644 --- a/checkin_notes +++ b/checkin_notes @@ -2777,3 +2777,11 @@ Charlie 18 Mar 2012 BOINCGUIApp.cpp,.h mac/ MacSysMenu.cpp + +David 19 Mar 2011 + - client: job scheduling policy tweak: + if CPUs are fully committed (e.g. with EDF jobs) + allow GPU jobs but only up to CPU usage of ncpus+1 + + client/ + cpu_sched.cpp diff --git a/client/cpu_sched.cpp b/client/cpu_sched.cpp index e6163f5027..77c7d0196f 100644 --- a/client/cpu_sched.cpp +++ b/client/cpu_sched.cpp @@ -1568,15 +1568,29 @@ bool CLIENT_STATE::enforce_run_list(vector& run_list) { RESULT* rp = run_list[i]; atp = lookup_active_task_by_result(rp); - // skip if we're already using all the CPUs + // if we're already using all the CPUs, + // don't allow additional CPU jobs; + // allow GPU jobs if the resulting CPU load is at most ncpus+1 // if (ncpus_used >= ncpus) { - if (log_flags.cpu_sched_debug) { - msg_printf(rp->project, MSG_INFO, - "[cpu_sched_debug] all CPUs used (%.2f >= %d), skipping %s", - ncpus_used, ncpus, - rp->name - ); + if (rp->uses_coprocs()) { + if (ncpus_used + rp->avp->avg_ncpus > ncpus+1) { + if (log_flags.cpu_sched_debug) { + msg_printf(rp->project, MSG_INFO, + "[cpu_sched_debug] skipping GPU job %s; CPU committed", + rp->name + ); + } + continue; + } + } else { + if (log_flags.cpu_sched_debug) { + msg_printf(rp->project, MSG_INFO, + "[cpu_sched_debug] all CPUs used (%.2f >= %d), skipping %s", + ncpus_used, ncpus, + rp->name + ); + } } continue; }