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

@ -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*);