FABRIC-3.10.8 MC-3a: the claim, the physics lock, per-core decision state
VM.running_on claimed by compare-and-swap on switch-in and released once the context is saved (release_after, sk_vm_switch_finish); a lost claim returns 1 and the caller re-decides; double claims counted. Per-core entry_vm and decision_due. g_lock_physics over capsule_vm_physics.c (rank between switch and registry). KILL refuses a VM running anywhere. Probe: 15737 claims, 0 lost, 0 double; a core-1 claim of Hera refused. 3-ISA acceptance with a 28-VM churn clean, 0 order violations. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
2e3b7ebe66
commit
4440faf352
@@ -52,6 +52,15 @@ int sk_vm_context_switch(struct VM *from, struct VM *to);
|
||||
* have entered an observer on a core other than core 0 (a guard; 0). */
|
||||
uint64_t sk_vm_switch_observer_refusals(void);
|
||||
|
||||
/* FABRIC-3.10.8 MC-3a: the claim. sk_vm_try_claim() takes `vm` for this
|
||||
* core (running_on 0 -> core_id + 1) by compare-and-swap: 1 if taken, 0 if
|
||||
* another core holds it (counted as lost). sk_vm_context_switch() returns
|
||||
* 1 when that happens to `to` -- nothing switched; the caller re-decides.
|
||||
* The stats: claims taken, claims lost, and double claims (a switch-in that
|
||||
* found its VM held by another core -- must stay 0). */
|
||||
int sk_vm_try_claim(struct VM *vm);
|
||||
void sk_vm_switch_claim_stats(uint64_t *claims, uint64_t *lost, uint64_t *doubles);
|
||||
|
||||
/* FABRIC-3.md §XXVIII Stage 3 follow-on (2026-09-14): which VM is
|
||||
* currently physically running, tracked by the switch mechanism itself --
|
||||
* see switch.c's own doc comment on g_switch_current_vm for why this
|
||||
|
||||
Reference in New Issue
Block a user