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:
Rongsong Shen 2026-08-03 05:45:53 +00:00
parent 4d8d72142e
commit 0d63a789a1
6 changed files with 398 additions and 2 deletions

View file

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