feat(scheduler-core): add picker configuration fields (task 1.3)
Adds xce_scheduler_t.job_pick_plugin (global picker name), and on xce_sched_queue_t: project_name + job_pick_plugin (per-queue override, NULL = inherit global). Adds xce_sched_project_t.priority (scaffolding only, no quota logic). sched_set_default_job_pick_plugin() is added but not yet wired into sched_init() -- task 2.4 owns that, alongside replacing the hardcoded "xce_sched_fcfs" literal. Requirements: 2.1, 2.2, 2.3, 2.4
This commit is contained in:
parent
4d8d72142e
commit
0d63a789a1
6 changed files with 398 additions and 2 deletions
|
|
@ -64,7 +64,12 @@ typedef struct {
|
|||
} xce_sched_user_t;
|
||||
|
||||
typedef struct {
|
||||
char* name;
|
||||
char* name;
|
||||
/* Req 2 AC (scheduler-core spec, task 1.3): inter-project ordering
|
||||
* scaffolding for a future spec (project-resource-ownership). No
|
||||
* quota/usage/hierarchy fields yet -- see design.md's "Out of Scope".
|
||||
* Defaults to 0 (make_sched_project, schedobj.c). */
|
||||
int32_t priority;
|
||||
} xce_sched_project_t;
|
||||
|
||||
typedef struct {
|
||||
|
|
@ -75,6 +80,17 @@ typedef struct {
|
|||
int32_t accept_interval;
|
||||
int32_t sched_delay;
|
||||
char* resreq;
|
||||
/* Req 2 AC 3 (scheduler-core spec, task 1.3): owning project name,
|
||||
* establishing the queue->project relationship. Scaffolding only --
|
||||
* xce_queue_t (the raw config struct) has no project field yet, so
|
||||
* make_sched_queue (schedobj.c) leaves this NULL; the picker plugin
|
||||
* may use it internally for project-scoped iteration (v2). */
|
||||
char* project_name;
|
||||
/* Req 2 AC 2: per-queue picker-plugin override. NULL means "inherit
|
||||
* sched->job_pick_plugin" (the global default). Non-NULL means jobs in
|
||||
* this queue use this picker instead -- how a picker plugin *uses* the
|
||||
* override is the plugin's concern, not the core loop's (task 2.4+). */
|
||||
char* job_pick_plugin;
|
||||
} xce_sched_queue_t;
|
||||
|
||||
typedef struct xce_sched_job_ {
|
||||
|
|
|
|||
|
|
@ -91,6 +91,14 @@ typedef struct {
|
|||
uint64_t nextid;
|
||||
xce_conf4sched_t* config;
|
||||
uint64_t configver;
|
||||
/* Req 2 AC 1 (scheduler-core spec, task 1.3): global picker plugin
|
||||
* name. NULL until sched_set_default_job_pick_plugin() (schedobj.c)
|
||||
* applies the "builtin_fcfs" default, or a future config-driven
|
||||
* assignment sets it explicitly. This field only carries the *name* --
|
||||
* resolving it against the plugin registry (plugin_register/key_find)
|
||||
* and failing startup loudly on an unregistered name (Req 2 AC 5) is
|
||||
* task 2.4's job. */
|
||||
char* job_pick_plugin;
|
||||
var plugins;
|
||||
void* seqjob_allocator;
|
||||
void* parjob_allocator;
|
||||
|
|
@ -125,6 +133,10 @@ extern int sched_init(xce_scheduler_t*, xce_client_config_t*,
|
|||
const xce_cluster_config_t*, xce_request_handler_t);
|
||||
extern void sched_fini(xce_scheduler_t*);
|
||||
extern int sched_init_config(xce_scheduler_t* sched, xce_conf4sched_t*);
|
||||
/* Req 2 AC 1 (scheduler-core spec, task 1.3): applies the "builtin_fcfs"
|
||||
* default to sched->job_pick_plugin when unset. See the field comment on
|
||||
* xce_scheduler_t above -- this does NOT resolve/register the name. */
|
||||
extern void sched_set_default_job_pick_plugin(xce_scheduler_t*);
|
||||
extern int sched_update(xce_scheduler_t*);
|
||||
extern void sched_go(xce_scheduler_t*);
|
||||
extern void sched_begin_session(xce_scheduler_t*);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue