- make new scheduler work for sequence jobs
This commit is contained in:
parent
e7ab1c16db
commit
6cf9aa0979
10 changed files with 461 additions and 319 deletions
|
|
@ -27,22 +27,29 @@ typedef struct {
|
|||
float value;
|
||||
} request_res_t;
|
||||
|
||||
struct xce_sched_obj_;
|
||||
typedef struct xce_sched_obj_ xce_sched_obj_t;
|
||||
|
||||
typedef struct {
|
||||
char* user;
|
||||
char* queue;
|
||||
char* project;
|
||||
xce_sched_obj_t* owner;
|
||||
xce_primary_resreq_t* resreq;
|
||||
xce_pendreason_t* reason;
|
||||
} xce_primary_schedobj_t;
|
||||
|
||||
typedef struct {
|
||||
char* user;
|
||||
char* queue;
|
||||
char* project;
|
||||
xce_sched_obj_t* owner;
|
||||
xce_compound_resreq_t* resreq;
|
||||
xce_pendreason_t* reason;
|
||||
} xce_compound_schedobj_t;
|
||||
|
||||
typedef struct {
|
||||
struct xce_sched_obj_ {
|
||||
xce_resreq_tag_t tag;
|
||||
uint64_t configver;
|
||||
char* user;
|
||||
char* queue;
|
||||
char* project;
|
||||
xlist_t glimits;
|
||||
zarray_t hlimits;
|
||||
union {
|
||||
xce_primary_schedobj_t* primary;
|
||||
xce_compound_schedobj_t* compound;
|
||||
|
|
@ -50,7 +57,7 @@ typedef struct {
|
|||
} u;
|
||||
xce_job_alloc_t* alloc;
|
||||
xce_pendreason_t* reason;
|
||||
} xce_sched_obj_t;
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
char* name;
|
||||
|
|
@ -97,20 +104,20 @@ typedef struct {
|
|||
} xce_sched_worker_t;
|
||||
|
||||
typedef struct {
|
||||
xce_sched_job_t* job;
|
||||
xce_sched_worker_t* worker;
|
||||
xce_sched_obj_t* schedobj;
|
||||
xce_job_alloc_t* alloc;
|
||||
void* sched;
|
||||
xce_sched_worker_t* worker;
|
||||
xce_sched_obj_t* schedobj;
|
||||
xce_primary_resreq_t* primary;
|
||||
int nhosts;
|
||||
int nslots;
|
||||
struct {
|
||||
xvec_t* shared;
|
||||
zarray_t hosts;
|
||||
} uncomitted;
|
||||
xvec_idval_t unmeet;
|
||||
xlist_t extra_res_requests;
|
||||
xlist_t extra_host_res_requests;
|
||||
xlist_t limits; /* non per host limits */
|
||||
xlist_t limits_host; /* PER HOST limits */
|
||||
xce_sched_alloc_req_t alloc_req;
|
||||
xce_job_alloc_t* alloc;
|
||||
xce_pendreason_t* reason;
|
||||
} xce_sched_ctx_t;
|
||||
|
||||
typedef struct {
|
||||
|
|
@ -129,9 +136,11 @@ extern void kill_sched_worker(void*);
|
|||
extern void kill_sched_user(void*);
|
||||
extern void kill_sched_project(void*);
|
||||
extern void kill_sched_resval(xce_val_t*);
|
||||
extern int sched_ctx_init(xce_sched_ctx_t*, xce_sched_job_t*);
|
||||
extern void sched_ctx_fini(xce_sched_ctx_t*);
|
||||
extern int sched_ctx_get_uncomit_shared(xvec_t**, xce_sched_ctx_t*);
|
||||
extern int sched_ctx_get_uncomit_host(xvec_t**, xce_sched_ctx_t*, int);
|
||||
extern int sched_ctx_init(xce_sched_ctx_t*, void*, xce_sched_obj_t*);
|
||||
extern void sched_ctx_fini(xce_sched_ctx_t*);
|
||||
extern void sched_ctx_set_primary(xce_sched_ctx_t*, xce_primary_resreq_t*);
|
||||
extern int sched_ctx_get_uncomit_shared(xvec_t**, xce_sched_ctx_t*);
|
||||
extern int sched_ctx_get_uncomit_host(xvec_t**, xce_sched_ctx_t*, int);
|
||||
extern void reset_sched_obj(xce_sched_obj_t*);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue