Running CPU remotely while the connection stays on the home node.
Run a process's CPU + memory on a remote execution node while its **sockets stay on the home node that owns the connection, and its files are served by the shared OCFS2** mount (native on the execution node). No live migration of a running process yet — Phase 1 launches the process remotely (or migrates it at a quiescent point); live checkpoint/restore is Phase 2.
This is openMosix's deputy/remote split, rebuilt on modern, supported APIs.
On the execution node the task is started under a seccomp filter whose action for network + node-identity syscalls is SECCOMP_RET_USER_NOTIF. The remote agent holds the resulting notify fd (SECCOMP_IOCTL_NOTIF_RECV). On each trap it:
process_vm_readv / /proc/<pid>/mem),process_vm_writev) and completes the notification (SECCOMP_IOCTL_NOTIF_SEND) with the return value.Why seccomp-notif (not syscall-table hijack / kprobes): it is a stable, supported API designed exactly for "handle this task's syscall in another process," including the continue/return-value and ADDFD facilities.
Socket lifecycle & I/O: socket, socketpair, bind, listen, accept, accept4, connect, getsockname, getpeername, setsockopt, getsockopt, shutdown, sendto, recvfrom, sendmsg, recvmsg, sendmmsg, recvmmsg, send, recv
fd ops that may touch a home-affine fd: close, dup, dup2, dup3, fcntl (F_DUPFD/F_GETFL/F_SETFL), poll, ppoll, select, pselect6, epoll_ctl, epoll_wait, read, write (only when the fd is home-affine — see fd classification)
Identity (so the process keeps its home identity): getpid, getppid (optional; configurable — some workloads need home PID)
mmap, brk, futex, clone/thread ops, ...).open/openat, read, write, stat, ... run locally against the shared mount. This is the big win from choosing OCFS2.Each fd the task holds is one of:
Implementation: the remote agent keeps an fd map per task. An fd becomes home-affine when created by a forwarded socket()/accept() (the deputy owns the real fd; the task holds a placeholder fd via SECCOMP_IOCTL_NOTIF_ADDFD so the numbering stays consistent). open() is allowed to run locally; at open time we decide affinity by checking whether the path resolves onto the OCFS2 mount (statfs magic / mount id). Node-local opens become home-affine and are forwarded.
read/write/poll are trapped but the handler first checks the fd map:
SECCOMP_USER_NOTIF_FLAG_CONTINUE).Note: _CONTINUE has a documented TOCTOU caveat for argument-dereferencing syscalls; we only use it for fds we've classified as local and whose operation doesn't depend on re-reading user pointers we validated. Data-carrying ops on home-affine fds are always fully forwarded, never continued.
accept()s a connection → real fd stays home.auto/manual) says the handler should run elsewhere.recv/send on the connection is forwarded to the deputy → the connection never leaves the node that accepted it.voltrond.ko, which moves them over verbs. (Open: could expose a kernel "forwarded-syscall" fast path later.)struct vmsg_hdr {
u32 magic; // 'VMSG'
u16 version;
u16 type; // REQ_SYSCALL, RSP_SYSCALL, BULK_READY, HELLO, ...
u64 task_cookie; // identifies the migrated task context
u64 seq;
u32 payload_len;
};
struct vmsg_syscall_req { s32 nr; u64 args[6]; u32 inbuf_len; /* bytes */ };
struct vmsg_syscall_rsp { s64 ret; s32 err; u32 outbuf_len; };
Pointer args are classified per-syscall (in/out/inout) by a small per-syscall descriptor table; in-buffers travel with the request, out-buffers with the reply (or via RDMA READ/WRITE for large transfers).
Forwarded syscalls cross the fabric, so chatty socket loops are the risk.
recvmmsg/sendmmsg; coalesce poll sets.getpid, kill, /proc/self. Scope carefully.voltrond.ko? Lean userspace for Phase 1; move hot paths to kernel if latency demands.voltrond.ko + agent channel (HELLO/echo over verbs).socket/bind/listen/accept/send/recv on real fds.