- save tmp works

- save works
This commit is contained in:
Rongsong Shen 2026-02-06 17:30:50 +08:00
parent cd4f3953b2
commit 12dcc2a60d
14 changed files with 386 additions and 110 deletions

View file

@ -77,6 +77,6 @@ extern int plugin_prepare_allocation(void*, xce_sched_ctx_t*);
extern int plugin_job_election(void*, xce_sched_ctx_t*);
extern int register_fcfs(void*);
extern int register_limit(void*);
extern int register_simple_allocator(void*);
extern int register_seqjob_allocator(void*);
#endif

View file

@ -7,6 +7,7 @@
#include <stdlib.h>
#include "kvmgr.h"
#include "resreq.h"
#include "typemap.h"
#include "xce/types.h"
#include "xlist.h"
@ -14,23 +15,12 @@
#include "zarray.h"
/* FIXME: improve later */
typedef void* host_selection_t;
typedef struct {
xvec_idval_t shared;
xvec_idval_t host;
} xce_sched_alloc_req_t;
typedef enum {
RESREQ_OP_SIMPLE
= 0, /* simple just a list of resources and require values */
RESREQ_OP_AFFINITY, /* with affinity allocation */
RESREQ_OP_GPU, /* with GPU allocation */
RESREQ_OP_PARALL, /* parall job nhosts, ptile and other constraints */
RESREQ_OP_AND, /* success for all */
RESREQ_OP_OR /* success for any */
} resreq_op_t;
/* simple resource allocation just have numeric resource values */
typedef struct {
char* res;
@ -38,17 +28,8 @@ typedef struct {
} request_res_t;
typedef struct {
host_selection_t selection;
xlist_t res_shared;
xlist_t res_host;
} resreq_simple_t;
typedef struct {
resreq_op_t op;
union {
resreq_simple_t simple;
} u;
} resreq_t;
xce_resreq_t* resreq;
} xce_sched_resreq_t;
typedef struct {
char* name;
@ -78,7 +59,7 @@ typedef struct {
xce_sched_queue_t* queue;
xce_sched_user_t* user;
xce_sched_project_t* project;
resreq_t* resreq;
xce_sched_resreq_t* resreq;
uint32_t mintasks;
uint32_t maxtasks;
xce_job_alloc_t* allocs;
@ -96,7 +77,7 @@ typedef struct {
typedef struct {
xce_sched_job_t* job;
xce_sched_worker_t* worker;
resreq_t* resreq;
xce_sched_resreq_t* resreq;
xce_job_alloc_t* alloc;
xce_pendreason_t* reason;
struct {

View file

@ -59,10 +59,10 @@ typedef struct {
uint64_t nextid;
xce_conf4sched_t* config;
kvmgr_t plugins;
void* simple_allocator;
void* seqjob_allocator;
void* parjob_allocator;
void* affinity_allocator;
void* gpu_allocator;
void* parallel_allocator;
dataq_t* pend_updates[2];
resmgr_t resmgr;
groupmgr_t ugmgr;
@ -107,7 +107,7 @@ extern int sched_commit_decision(xce_scheduler_t*, xce_decision_t*);
extern int sched_publish_pend_reason(xce_scheduler_t*, xce_preason_set_t*);
extern int sched_publish_dispatch(xce_scheduler_t*, xce_job_dispatch_t*);
extern int sched_meet_host_selection(xce_scheduler_t*, xce_sched_worker_t*,
host_selection_t*);
xce_select_t*);
extern int sched_check_shared_satisfy(xce_scheduler_t*, xvec_t*, xvec_idval_t*,
xvec_idval_t*);
extern int sched_check_host_satisfy(xce_scheduler_t*, xce_sched_worker_t*,