voltron-psid)Per-node load gossip and the PSI auto-decision loop.
Implements the **auto** migration mode: when an eligible cgroup's pressure crosses its threshold, Voltron decides to migrate it to a less-loaded node.
Per the project's design, the decision loop runs in userspace (keeps the kernel module small) and uses the kernel's native PSI trigger mechanism (poll(POLLPRI) on a cgroup pressure file). Decisions are delivered back to the kernel for the migration engine to execute.
cgroup under pressure
│ (PSI trigger fires)
▼
voltron-psid ── reads policy ──▶ /sys/kernel/voltron/policy/cgroups/<id>/{mode,psi_*}
│ ── reads nodes ──▶ /sys/kernel/voltron/cluster/nodes/*/{state,fs_eligible}
│ ── picks target node (eligible, round-robin for now)
▼
writes decision ──▶ /sys/kernel/voltron/decisions/request "<cgroup_id> <node_id>"
│
▼ (future) migration engine: CRIU + agent + RDMA
/sys/kernel/voltron/policy/cgroups/<id>/ for entries with mode=auto, reading psi_metric, psi_threshold (permille), and min_residency_ms./sys/fs/cgroup (cgroup-v2 id == directory inode).psi_metric -> file/line: cpu→cpu.pressure some, memory→memory.pressure some, io→io.pressure some, full→memory.pressure full.stall_us = psi_threshold/1000 * window_us (e.g. 400 over a 1s window = "stalled >= 400 ms per second").poll(POLLPRI)s all triggers. On a fire, enforces min_residency_ms (anti-thrash), picks an eligible target node, and writes the decision to /sys/kernel/voltron/decisions/request.--rescan-sec (default 5s), arming/closing triggers as cgroups and policy change. Vanished cgroups are swept (trigger POLLERR)./sys/kernel/voltron/decisions/| File | Mode | Meaning |
|---|---|---|
request | w | "<cgroup_id> <node_id>" — record a migration decision |
log | r | recent decisions (oldest first): ts=… cgroup=… node=… |
count | r | total decisions recorded since load |
This is the integration point the migration engine (CRIU + agent over RDMA) will consume; today decisions are logged (dmesg + decisions/log) for observability.
cd userspace/voltron-psid && make # -> voltron-psid sudo ./voltron-psid --local-id 1 # defaults: /sys/kernel/voltron, /sys/fs/cgroup # --window-ms N PSI window (default 1000) # --rescan-sec N policy/node rescan (default 5) # --dry-run log decisions instead of writing them
Mark a cgroup auto (via either policy surface):
CGID=$(stat -c %i /sys/fs/cgroup/compute.slice) echo "$CGID" | sudo tee /sys/kernel/voltron/policy/add_cgroup echo auto | sudo tee /sys/kernel/voltron/policy/cgroups/$CGID/mode echo cpu | sudo tee /sys/kernel/voltron/policy/cgroups/$CGID/psi_metric echo 400 | sudo tee /sys/kernel/voltron/policy/cgroups/$CGID/psi_threshold # or, with the cgroup-fs livepatch loaded: echo "mode auto" | sudo tee /sys/fs/cgroup/compute.slice/voltron.policy echo "psi_threshold 400" | sudo tee /sys/fs/cgroup/compute.slice/voltron.policy
Watch decisions:
cat /sys/kernel/voltron/decisions/log
CONFIG_PSI=y and the cgroup's pressure files writable (root).score (from the per-node load collector) is chosen; falls back to round-robin until peers have published a score.