- 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

@ -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 {