FABRIC-3.10.8 K-11: check the lock order at run time
Every lock carries a rank (hermes < switch < registry < VM dict_lock < VM tuning_lock < stadium < slot < doe < log < block < console < heap < vmm < pmm); each core counts held locks per rank and an acquisition not above the highest held rank counts an order violation, reported in full at the idle point. Probe inversion reported exactly once; O-A, a 28-VM churn and the standard sequence show 0 violations on all three ISAs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
a66c4f3d5e
commit
7252e2ed72
@@ -42,6 +42,7 @@
|
||||
#define STARKERNEL_PERCPU_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include "starkernel/spinlock.h" /* SK_LOCK_RANK_COUNT */
|
||||
|
||||
struct VM;
|
||||
|
||||
@@ -57,6 +58,9 @@ typedef struct sk_percpu {
|
||||
uint64_t saved_irq;
|
||||
uint64_t lock_acquired; /* every acquire on this core, ever */
|
||||
uint64_t lock_released; /* every release on this core, ever */
|
||||
/* K-11 (spinlock.c): locks this core holds right now, per rank -- the
|
||||
* lock-order check compares a new lock's rank with the highest held. */
|
||||
uint32_t held_rank[SK_LOCK_RANK_COUNT];
|
||||
} sk_percpu_t;
|
||||
|
||||
/* Installs the boot core's block in this core's per-CPU register. Call
|
||||
|
||||
Reference in New Issue
Block a user