Usage

Load the module, configure the cluster, and set per-cgroup policy.

Transparent process distribution for Linux (an openMosix revival): run a process's CPU + memory on another cluster node while its network stays on the home node and its files are served by a shared OCFS2 mount. Policy is per cgroup, default-deny. Data plane is in-kernel RDMA; membership/auth live in the userspace daemon voltron-ctld.

There are two surfaces for the same per-cgroup policy store: the cgroup-native file /sys/fs/cgroup/<cg>/voltron.policy (preferred; provided by the voltron_cgroup_lp live-patch module), and the id-keyed tree under /sys/kernel/voltron/policy/cgroups/<id>/. Writing either updates the same record. Implementation status is tracked at the end of this document.

11. Components

ComponentSpaceRole
voltron.kokernelsysfs control surface, per-cgroup policy store, trusted node table, in-kernel RDMA data plane, decisions + load
voltron_cgroup_lp.kokernellive-patch module: exposes the policy as /sys/fs/cgroup/<cg>/voltron.policy (same store as voltron.ko)
voltron-ctldusercluster membership (Corosync/OCFS2 stack), authorization, OCFS2 admission check, pushes validated state into the kernel
voltron-psiduserPSI auto-decision loop (watches per-cgroup pressure, picks a target, posts a decision)
voltron-agentusermigration mechanism: CRIU C/R + seccomp deputy/remote network pinning

The kernel trusts whatever voltron-ctld feeds it; it performs no membership or authentication itself.


22. Install & load

Build against the running (v7.3) kernel and load:

cd src && make KDIR=/lib/modules/$(uname -r)/build      # -> voltron.ko
sudo insmod voltron.ko

# optional: the cgroup-native policy interface (/sys/fs/cgroup/<cg>/voltron.policy)
cd ../livepatch && make KDIR=/lib/modules/$(uname -r)/build   # -> voltron_cgroup_lp.ko
sudo insmod voltron_cgroup_lp.ko                        # depends on voltron.ko

Verify:

cat /sys/kernel/voltron/version                         # 0.0.1
ls  /sys/kernel/voltron/                                # cluster/ policy/ decisions/ load/ version default_mode
ls  /sys/fs/cgroup/*/voltron.policy 2>/dev/null         # if the live-patch is loaded

Unload (reverse order):

sudo rmmod voltron_cgroup_lp
sudo rmmod voltron

33. sysfs interface reference

Root: /sys/kernel/voltron/

PathModeMeaning
versionrmodule version
default_moderwcluster-wide default policy; may only be deny

Cluster — /sys/kernel/voltron/cluster/

PathModeWrite formatMeaning
local_node_idrw<u32>this node's id
add_nodew<id> <addr> <gid>add a peer to the trusted table
del_nodew<id>remove a peer
rdma_listenw<port>start the RDMA RC listener
nodes/<id>/addrrpeer control address
nodes/<id>/gidrpeer RDMA GID
nodes/<id>/staterwup\downmembership state
nodes/<id>/fs_eligiblerw0\1OCFS2 verified mounted+writable there
nodes/<id>/connectw<port>open an RDMA RC connection to this peer
nodes/<id>/sendw<text>SEND a message over that connection (bring-up/test)
Normally voltron-ctld writes the cluster/* files for you. The connect/send triggers are for bring-up and diagnostics.

Policy — /sys/kernel/voltron/policy/

PathModeWrite formatMeaning
add_cgroupw<cgroup_id>create a policy entry for a cgroup
del_cgroupw<cgroup_id>delete it
cgroups/<id>/moderwdeny\auto\manualmigration behavior
cgroups/<id>/targetrw<node_id>destination node (manual mode)
cgroups/<id>/psi_metricrwcpu\memory\io\fullPSI signal watched (auto mode)
cgroups/<id>/psi_thresholdrw0..1000threshold in permille of PSI avg (auto mode)
cgroups/<id>/min_residency_msrw<ms>anti-thrash guard before re-migrating
cgroups/<id>/inheritrw0\1descendant cgroups inherit this entry

Per-cgroup file (cgroup-native) — /sys/fs/cgroup/<cg>/voltron.policy

With the voltron_cgroup_lp live-patch loaded, every cgroup has a voltron.policy file next to cgroup.procs — the natural place to read/set policy, no numeric ids:

cat /sys/fs/cgroup/batch.slice/voltron.policy     # shows the whole record
#   cgroup_id 1234
#   mode deny
#   target 0
#   psi_metric cpu
#   psi_threshold 0
#   min_residency_ms 0
#   inherit 1

# write one `<key> <value>` per line:
echo "mode auto"         | sudo tee /sys/fs/cgroup/batch.slice/voltron.policy
echo "psi_threshold 400" | sudo tee /sys/fs/cgroup/batch.slice/voltron.policy

Keys: mode (deny|auto|manual), target, psi_metric (cpu|memory|io|full), psi_threshold (0..1000 permille), min_residency_ms, inherit (0|1). The file appears in cgroups where the controller it rides on (default memory) is enabled.

The id-keyed tree (/sys/kernel/voltron/policy/cgroups/<id>/) is the same store; its id is the cgroup directory inode — resolve a path with stat -c %i <path> (or let voltron-ctld translate paths for you). Use it when the live-patch isn't loaded.

Effective policy resolution for a task: its own cgroup entry always applies; otherwise the nearest ancestor whose entry has inherit=1; otherwise default_mode (deny). System cgroups (init/systemd, sshd, cron, the DLM/corosync) are therefore never migratable unless explicitly opted in.


44. Cluster setup with voltron-ctld

Build and configure the daemon:

cd userspace/voltron-ctld && make
cp voltron-ctld.conf.example /etc/voltron-ctld.conf

/etc/voltron-ctld.conf:

local_id   1
sysfs_root /sys/kernel/voltron
fs_mount   /srv/shared          # the shared OCFS2 mountpoint
provider   static              # or "corosync" (needs libcpg at build time)
# static peer list: <id> <control-addr> <rdma-gid>
peer 2 10.0.0.2 fe80::0202:00ff:fe00:0002
peer 3 10.0.0.3 fe80::0303:00ff:fe00:0003

Run it:

sudo ./voltron-ctld -c /etc/voltron-ctld.conf          # daemon
sudo ./voltron-ctld -c /etc/voltron-ctld.conf --dry-run --once   # show what it would write

On start it:

  1. runs the OCFS2 admission check on fs_mount (must be OCFS2 and writable, or this node is marked not migration-eligible),
  2. writes local_node_id,
  3. starts the membership provider,
  4. reconciles reachable peers into the kernel node table.

Flags: -c/--config PATH, --dry-run (log instead of write), --once (single reconcile pass then exit), -h/--help.


55. Configuring migration policy

5.1 Manual: pin a cgroup to a specific node

Run a workload in its own cgroup and pin it to node 2:

# create a cgroup and place a shell in it
sudo mkdir -p /sys/fs/cgroup/batch.slice
echo $$ | sudo tee /sys/fs/cgroup/batch.slice/cgroup.procs

# set policy on the cgroup-native file (no numeric ids)
echo "mode manual" | sudo tee /sys/fs/cgroup/batch.slice/voltron.policy
echo "target 2"    | sudo tee /sys/fs/cgroup/batch.slice/voltron.policy
echo "inherit 1"   | sudo tee /sys/fs/cgroup/batch.slice/voltron.policy
cat /sys/fs/cgroup/batch.slice/voltron.policy          # read back

Every migratable task in batch.slice (and descendants, via inheritance) is placed on node 2.

Without the live-patch (id-keyed tree, same result):

CGID=$(stat -c %i /sys/fs/cgroup/batch.slice)
echo "$CGID" | sudo tee /sys/kernel/voltron/policy/add_cgroup
echo manual  | sudo tee /sys/kernel/voltron/policy/cgroups/$CGID/mode
echo 2       | sudo tee /sys/kernel/voltron/policy/cgroups/$CGID/target

5.2 Automatic: migrate under PSI pressure

Migrate when CPU pressure in the cgroup exceeds 40% (some avg), with a 5s anti-thrash guard:

cg=/sys/fs/cgroup/compute.slice; sudo mkdir -p $cg
echo "mode auto"           | sudo tee $cg/voltron.policy
echo "psi_metric cpu"      | sudo tee $cg/voltron.policy
echo "psi_threshold 400"   | sudo tee $cg/voltron.policy   # 40.0%
echo "min_residency_ms 5000" | sudo tee $cg/voltron.policy

Then run the decision daemon (userspace): it watches the cgroup's cpu.pressure via PSI triggers and posts a migration decision for the least-loaded eligible node.

sudo ./userspace/voltron-psid/voltron-psid --local-id 1

5.3 Remove / disable

echo "mode deny" | sudo tee /sys/fs/cgroup/compute.slice/voltron.policy   # stop migrating
# to drop the record entirely (id-keyed tree):
CGID=$(stat -c %i /sys/fs/cgroup/compute.slice)
echo "$CGID"     | sudo tee /sys/kernel/voltron/policy/del_cgroup

(A cgroup's record is also freed automatically when the cgroup is removed.)


66. RDMA data path (bring-up / diagnostics)

Establish and test an RDMA connection manually (normally driven by migration):

echo 18515 | sudo tee /sys/kernel/voltron/cluster/rdma_listen            # on the listener node
echo 18515 | sudo tee /sys/kernel/voltron/cluster/nodes/2/connect        # dial peer 2
echo hello | sudo tee /sys/kernel/voltron/cluster/nodes/2/send           # send a message
dmesg | tail                                                             # see connect/recv logs

See docs/TESTING.md for full ConnectX-3/-4 setup and the two-node runbook.


77. What's protected by default

With default_mode=deny and no policy entry, nothing migrates. You must explicitly opt a cgroup in. This keeps system-critical services (init/systemd, sshd, cron, the OCFS2 DLM, corosync) on their home node. Do not set auto/manual on a slice that contains such services.


88. Implementation status

CapabilityStatus
sysfs control surface + per-cgroup policy store + inheritance + reaperworking (VM-tested)
cgroup-native voltron.policy live-patch (unified store)working (VM-tested)
cluster node table + voltron-ctld (static membership, OCFS2 admission)working
in-kernel RDMA transport (connect/SEND/RECV/stream/listen)working (SoftRoCE VM-tested)
per-node load collector + RDMA gossipworking (VM-tested)
PSI auto-decision loop (voltron-psid) + decisions intakeworking
network pinning (seccomp deputy/remote) + cross-node remote-execworking (self- & two-VM tested)
attach pin into a CRIU-restored task (ptrace + pidfd_getfd)working (self-tested)
process migration (CRIU C/R + agent)integrated; full in-VM C/R pending kernel net cfg
voltron-ctld: Corosync providerstub (compiles when libcpg present)

See docs/ARCHITECTURE.md, docs/CLUSTER.md, and docs/PHASE1.md for design detail, and docs/BUILD.md / docs/TESTING.md for build and test procedures.