204 | | scheduler |
205 | | }}} |
| 204 | == Scheduler changes == |
| 205 | {{{ |
| 206 | global vars |
| 207 | have_cpu_app_versions |
| 208 | have_cuda_app_versions |
| 209 | per-req vars |
| 210 | bool coproc_request |
| 211 | ncpu_jobs_sending |
| 212 | ncuda_jobs_sending |
| 213 | ncpu_seconds_to_fill |
| 214 | ncuda_seconds_to_fill |
| 215 | seconds_to_fill |
| 216 | (backwards compat; used if !coproc_request) |
| 217 | overall startup |
| 218 | scan app versions, set have_x vars |
| 219 | req startup |
| 220 | if send_only_cpu and no CPU app versions, don't send work |
| 221 | if send_only_cuda and no CUDA app versions, don't send work |
| 222 | work_needed() |
| 223 | need_more_cpu_jobs = |
| 224 | n_cpu_jobs_sending < ninstances_cpu |
| 225 | or cpu_seconds_to_fill > 0 |
| 226 | same for cuda |
| 227 | return false if don't need more CPU or more CUDA |
| 228 | get_app_version |
| 229 | if send_only_cpu, ignore CUDA versions |
| 230 | if send_only_cuda, ignore CPU versions |
| 231 | when commit a job |
| 232 | update n*_jobs_sending, |
| 233 | n*_seconds_to_fill, |
| 234 | seconds_to_fill |
| 235 | }}} |