Commit graph

19 commits

Author SHA1 Message Date
7ee9a16f53
feat(scheduler-core): wire builtin_fcfs as registered default picker (task 2.4)
Registers builtin_fcfs at scheduler startup and makes it the default
job_pick_plugin, replacing the hardcoded "xce_sched_fcfs" literal in
sched_job_picker() with a fail-loud lookup through sched_resolve_job_picker().
The picker thread now branches legacy job_elect_fn plugins (delegated
unchanged, preserving their self-contained wbuf-driven loop) from native
xce_job_picker_iface_t pickers (driven by a new per-session loop), and the
allocator now calls on_dispatch/on_pend for every picker as Req 1 AC 4
requires. Closes task 2.3's flagged picker/allocator concurrency race with a
mutex on fcfs_plugin_data_t, and adds cancel points to next_job().
2026-08-03 08:51:45 +00:00
4d8d72142e feat(scheduler-core): register picker plugin category + job_elect_fn compat wrapper (task 1.2)
plugin_register() now adapts an old-style job_elect_fn-only plugin to
xce_job_picker_iface_t via legacy_picker_wrapper_iface (next_job()
forwards to job_elect_fn; other hooks are safe no-ops covered elsewhere
in the existing lifecycle), logging a one-time deprecation warning. A
plugin that already sets picker_iface directly skips the wrapper and
the warning. Reuses the existing plugin_register()/key_find() mechanism
-- no parallel registration system.

Requirements: 1.6, 2.5
2026-08-03 05:23:53 +00:00
065025a3a6 feat(scheduler-core): define job picker plugin contract (task 1.1)
Add xce_job_picker_iface_t to plugin.h with all 13 hooks across
lifecycle/state-change/session/post-allocation/optional categories,
matching design.md's literal struct. Documents per-category thread
assignment, next_job() cancel-safety, and begin_session() session-reset
requirements. Forward-declares xce_sched_core_t (built in a later task).

Requirements: 1.2, 1.5, 2.6
2026-08-03 04:49:55 +00:00
3e652d2d7e feat: fill scheduler controller message gaps
Wire up 6 previously-stubbed message handlers in the scheduler:
resource dataset, resval dataset, job update notify, queue update
notify, resval update notify, and job rusage notify. Remove the
unreachable pushmsg branch (vtask_entry rewrites all pushmsg to
datamsg before the handler fires).

Changes by component:
- helper.h/helper.c: add xce_notify_event_name() for symbolic log names
- scheduler.h: add 5 new xce_sched_op_t values and matching union fields
- plugin.h/plugin.c: add plugin_job_rusage_hook_t and plugin_job_rusage_update()
- schedobj.c: add sched_update_existing_queue() with NULL/-ENOENT guards
- scheduler.c: wire 5 new dequeue cases; add sched_update_existing_job()
  and static sched_op_name(); emit WARN log on handler failure
- handler.c: implement sched_handle_resources/resvals (dataset) and
  sched_handle_sched_update_{job,queue,resvals}/job_rusage (notify);
  remove dead sched_handle_jobpush/workerpush and pushmsg branch;
  update TRACE logs to use symbolic name helpers
- test.c: 5 new unit tests covering notify event names, enum values,
  and queue update NULL guard (15/15 pass)
2026-05-12 07:01:52 +00:00
3f74f14687 save works 2026-03-04 18:18:53 +08:00
6cf9aa0979 - make new scheduler work for sequence jobs 2026-02-12 11:20:17 +08:00
12dcc2a60d - save tmp works
- save works
2026-02-06 17:31:02 +08:00
06209930f9 improve 2026-01-15 17:56:53 +08:00
ecf1916d78 support limit 2026-01-12 15:27:54 +08:00
780e9fb313 scheduling using real slots number 2025-12-30 18:13:15 +08:00
4769e6845f improve configuration handling 2025-12-26 17:52:43 +08:00
ae658c4a23 working of scheduler to handle configuration 2025-12-26 15:22:21 +08:00
a46ea822c1 working on scheduler and fix issue #17 2025-12-25 16:24:56 +08:00
4034fd7556 fix pkt size problem and fmt_jobid 2025-12-24 17:56:45 +08:00
088afe4ea0 scheduling job with fake resource 2025-12-23 18:12:13 +08:00
5560ae91da pass pend reason back to controller 2025-12-23 15:29:26 +08:00
cd0bca3138 save works 2025-12-22 18:24:43 +08:00
c1e42b1ee2 save works 2025-12-22 17:32:52 +08:00
abea3375ca save 2025-12-22 10:53:29 +08:00