From 6c5849d817c9dbbf1e94677029037c6e4abab4d0 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Wed, 3 Sep 2014 15:35:36 -0700 Subject: [PATCH] scheduler: fix bug that caused no jobs to be sent to pre-6.7 clients --- sched/sched_types.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sched/sched_types.h b/sched/sched_types.h index 79743270ea..c4d54d8fb9 100644 --- a/sched/sched_types.h +++ b/sched/sched_types.h @@ -398,9 +398,6 @@ struct WORK_REQ_BASE { // instance-seconds requested double req_instances[NPROC_TYPES]; // number of idle instances, use if possible - inline bool need_proc_type(int t) { - return (req_secs[t]>0) || (req_instances[t]>0); - } inline void clear_req(int proc_type) { req_secs[proc_type] = 0; req_instances[proc_type] = 0; @@ -414,6 +411,13 @@ struct WORK_REQ_BASE { // bool rsc_spec_request; + inline bool need_proc_type(int t) { + if (rsc_spec_request) { + return (req_secs[t]>0) || (req_instances[t]>0); + } + return seconds_to_fill > 0; + } + double disk_available; double ram, usable_ram; double cpu_available_frac;