scheduler: time-window dispatch reason (PEND-reason #17/E11)
Add queue dispatch-window support so a queue whose window is closed (queues.yaml dispatch_window, e.g. 19:00-08:30) is treated as non-electable and reports PREASON_TIME_WINDOW. - lib/window.c: new xce_timewindow_is_open() — NULL/empty always open, same-day and overnight (close < open) segments, day-scoped (0=every day, 1-7=Mon..Sun). - scheduler: make_sched_queue duplicates dispatchwindow_config onto xce_sched_queue_t.dispatchwindow (freed by kill_sched_queue); sched_queue_is_ready() checks it; sched_queue_status_reason() now takes the queue (was a bare status bitmask) and maps a closed window to PREASON_TIME_WINDOW. - fcfs: keep the windowed-out queue skip; do NOT attach the queue-status reason to job->schedobj from the picker thread (bug-1521: races the allocator thread's MOVE_PTR(obj->reason,...) and corrupts the heap). - tests: test_window.c (5 cases) covers no-window/daily/overnight/ day-scoped/multi-seg; full suite 295/295 pass. Cluster-verified: with a 09:00-17:00 window on the xce queue (currently outside the window), fcfs reports "queue xce ... ready=0 reason=8" (PREASON_TIME_WINDOW). Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
53c0083410
commit
ee791791bd
10 changed files with 243 additions and 34 deletions
|
|
@ -152,6 +152,7 @@ libxce_test_src = ['testsuite/test.c',
|
|||
'testsuite/test_delay.c',
|
||||
'testsuite/test_ordq.c',
|
||||
'testsuite/test_preason.c',
|
||||
'testsuite/test_window.c',
|
||||
'testsuite/test_kvmgr.c',
|
||||
'testsuite/test_group.c',
|
||||
'testsuite/test_xlist.c',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue