Restartable Sequences: Scaling Per-Core Shared Memory Use in Containers
summary
Proposal extends restartable sequences with a new per-memory-space vcpu ID field so shared memory users allocate arrays sized to container-visible CPUs instead of global possible CPUs. Kernel patch adds mm_vcpu_id, a bitmap allocator for vCPU IDs, and uses scheduler/cgroup CPU-set info; implementation lazy-allocates per-index (null pointers then real pages) to limit memory. Works for per-process arenas but raises shared-memory issues: where to store the bitmap (cgroup vs IPC namespace), hierarchical cgroup behavior, and CRIU checkpoint/restore mismatches.
AI-written summary · about
chapters (10)
- 0:00Introduction to restartable sequences
- 1:46Problem with per-core memory in containers
- 4:55Restartable sequences for memory allocators
- 8:27Shared memory use in containers
- 12:23Max vCPU allocation challenges
- 13:07Restartable sequence vCPU ID allocation domain
- 18:40Namespace and cgroup considerations
- 20:26Independence from constraint technology
- 21:08Dynamic CPU set changes
- 22:11Q&A and closing
related talks
20mGet More Computing Power by Helping the OS Scheduler
31mEnhancing Scalability of the Vmalloc Mechanism in the Linux Kernel
32mA mechanism to isolate CPU topology information in the Linux kernel -- CPU Namespace
21mCgroup Slab Memory Controller and Time Namespace
26mCXL Memory Tiering for heterogenous computing
30mdrm and cgroup memory management - two great tastes
11mAdvanced Parallel Memory Virtualization
43mAddress Space Isolation for Enhanced Safety of the Linux Kernel
