feat(scheduler-allocation): implement the unsatisfiable-resreq cache

Adds alloc_cache.c: xce_cache_key_t, cache_key_ops (the corrected
three-way, 0-means-equal .cmp -- an inverted-boolean version was a
real bug found during design review), and cache_lookup/insert/clear
against a real kvtab_t (constructed matching xce_select.c's
sel_node_table_init() precedent). Cache values are a boxed reason-
category int, not a bare hit/miss sentinel, satisfying Req 7 AC5's
requirement that a hit reproduce the original pend-reason category.
unsatisfiable_cache lives on xce_scheduler_t per Req 7 AC1.

Task 2.2 (scheduler-allocation spec). Requirements 7.1, 7.3, 7.4, 7.5.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XYdtrEWWZfKRRGED7raEYg
This commit is contained in:
Rongsong Shen 2026-09-04 17:23:59 +00:00
parent d9831b0bc8
commit 86c86352d1
No known key found for this signature in database
GPG key ID: 5BCDAAE0123E9FE2
8 changed files with 871 additions and 1 deletions

View file

@ -28,6 +28,7 @@ scheduler_srcs = [
'src/schedobj.c',
'src/plugin.c',
'src/resource.c',
'src/alloc_cache.c',
'src/plugins/fcfs.c',
'src/plugins/builtin_fcfs.c',
'src/plugins/seqjob_allocator.c',