fix(scheduler): apply a mid-replay CONFIG_PUSH to the sim limit plugin (bug-1964)
Cause: live applies every pushed config through sched_init_config(), whose plugin_config_update() runs each plugin's config_hook (the limit plugin builds its limits there). The simulator seeded the limit plugin only at bootstrap (sim_bootstrap_limit_plugin()); the core's CONFIG_PUSH event loaded groups, resources and queues but never told the plugins, so a limit added during a replay never existed in sim. Fix: one shared fan-out, plugin_config_update_core(core, config), which live's plugin_config_update() now delegates to. The core's CONFIG_PUSH calls a driver-registered xce_core_config_cb_t after loading groups (live order), keeping the core free of plugin.c; the simulator registers the fan-out in sim_bootstrap_limit_plugin(). limit_update_config() reads the honestly-typed plugin->core instead of casting plugin->sched, so the hook is safe on the sim core; the hand-built plugin fixtures in test_limit_plugin.c/test_repl_limit_table.c now set plugin->core as plugin_register() does. test_sim_limit_config_push_parity.c covers it. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
2cd02cdc8c
commit
3224e90683
13 changed files with 452 additions and 7 deletions
|
|
@ -122,6 +122,7 @@ typedef struct {
|
|||
extern int plugin_register(void*, void*);
|
||||
extern void plugin_unregister(void*);
|
||||
extern int plugin_config_update(void*, xce_conf4sched_t*);
|
||||
extern int plugin_config_update_core(xce_sched_core_t*, xce_conf4sched_t*);
|
||||
extern int plugin_queue_update(void*, xce_sched_queue_t*);
|
||||
extern int plugin_job_update(void*, xce_sched_job_t*);
|
||||
extern int plugin_worker_update(void*, xce_sched_worker_t*);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue