feat(scheduler-core): extract xce_sched_core_t from monolithic scheduler struct (task 4.1)
Splits xce_scheduler_t along the controller-I/O seam: xce_sched_core_t
(new core.h/core.c) now holds all scheduling state (jobs/queues/workers/
users/projects/resource managers/plugins/three-thread-cbuf pipeline),
while xce_scheduler_t shrinks to {core; apictx; cluster_cfg}. Proven via
an nm-based link-time isolation test (zero netio/xcecli/idgen/delaymgr
symbols reachable from core.c) plus a reproducible wall-clock-call guard.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019dw5WnN3DXStaEaPYfACU1
This commit is contained in:
parent
604a564904
commit
7c229284e2
26 changed files with 1233 additions and 661 deletions
|
|
@ -175,6 +175,34 @@ sched_pendreason_factory_audit_test = executable(
|
|||
+ '"'],
|
||||
install: false)
|
||||
|
||||
# Regression guard for task 4.1's Observable (scheduler-core spec, Req
|
||||
# 5.1/5.2): "the core structure compiles and links with zero symbols from
|
||||
# the networking/API libraries ... a build-time or link-time check
|
||||
# confirms this." Same source-text-scan genre as
|
||||
# sched_picker_core_loop_boundary_test / sched_pendreason_factory_audit_test
|
||||
# above, PLUS a genuine link-time proof: it inspects the undefined-symbol
|
||||
# table (via nm(1)) of sched_core_isolation_lib (defined in the parent
|
||||
# meson.build -- core.c compiled alone, isolated from the rest of the
|
||||
# scheduler). link_with establishes the build-order dependency so that
|
||||
# archive exists before this test runs; XCE_CORE_LIB_PATH bakes in its
|
||||
# absolute path the same way XCE_SCHEDULER_C_PATH does above.
|
||||
sched_core_isolation_test = executable(
|
||||
'sched_core_isolation_test',
|
||||
['test_core_isolation.c'],
|
||||
include_directories:[incdir],
|
||||
dependencies: [scheduler_test_deps],
|
||||
link_with: [sched_core_isolation_lib],
|
||||
c_args: ['-DXCE_CORE_H_PATH="'
|
||||
+ (meson.current_source_dir() / '..' / 'include' / 'core.h')
|
||||
+ '"',
|
||||
'-DXCE_CORE_C_PATH="'
|
||||
+ (meson.current_source_dir() / '..' / 'src' / 'core.c')
|
||||
+ '"',
|
||||
'-DXCE_CORE_LIB_PATH="'
|
||||
+ sched_core_isolation_lib.full_path()
|
||||
+ '"'],
|
||||
install: false)
|
||||
|
||||
# Register as meson tests so `meson test --suite scheduler` runs them all.
|
||||
# detect_leaks=0 matches the suite convention (fixtures are not torn down).
|
||||
test('scheduler test', scheduler_test, suite: 'scheduler',
|
||||
|
|
@ -205,3 +233,6 @@ test('scheduler picker core loop boundary test',
|
|||
test('scheduler pendreason factory audit test',
|
||||
sched_pendreason_factory_audit_test, suite: 'scheduler',
|
||||
env: ['ASAN_OPTIONS=detect_leaks=0'])
|
||||
test('scheduler core isolation test',
|
||||
sched_core_isolation_test, suite: 'scheduler',
|
||||
env: ['ASAN_OPTIONS=detect_leaks=0'])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue