mirror of
https://github.com/wirenboard/agent-vm.git
synced 2026-07-10 00:14:30 +00:00
libkrunfw: enable POSIX_MQUEUE for OCI container runtimes
runc/crun unconditionally mount /dev/mqueue from their default OCI spec; with POSIX_MQUEUE off the guest kernel returns ENODEV and every container start (docker run, podman, buildkit RUN) fails before user code ever executes. Cost measured on a clean v5.2.1 rebuild (Debian 13 gcc 14.2.0): +4 KB stripped vmlinux, +12 KB bzImage, +64 KB on the shipped .so (page padding). 15-run nested-VM cold-boot mean unchanged within noise (1.069s baseline vs 1.057s with mqueue, sd ~25 ms). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
e99a02f886
commit
75297b6db9
2 changed files with 20 additions and 1 deletions
|
|
@ -24,9 +24,19 @@ Docker-in-Docker / nested KVM use cases, so we flip:
|
|||
| `CONFIG_KVM=y` | enable the in-kernel KVM hypervisor |
|
||||
| `CONFIG_KVM_INTEL=y` | Intel VMX backend |
|
||||
| `CONFIG_KVM_AMD=y` | AMD SVM backend |
|
||||
| `CONFIG_POSIX_MQUEUE=y` | runc/crun default OCI spec always mounts `/dev/mqueue`; without this every container start fails with `mount mqueue: no such device` |
|
||||
|
||||
`olddefconfig` pulls in the rest (`KVM_X86`, `KVM_SMM`, `KVM_HYPERV`,
|
||||
`KVM_VFIO`, …) automatically.
|
||||
`KVM_VFIO`, `POSIX_MQUEUE_SYSCTL`, …) automatically.
|
||||
|
||||
`devtmpfs` and `DEVTMPFS_MOUNT` are already enabled upstream so
|
||||
`/dev/kvm` materializes at boot without further config changes.
|
||||
|
||||
## Cost of each override
|
||||
|
||||
Measured by rebuilding the `.so` from a pristine v5.2.1 checkout with and
|
||||
without each hunk (Debian 13 toolchain, gcc 14.2.0):
|
||||
|
||||
| change | `bzImage` Δ | stripped `vmlinux` Δ | `libkrunfw.so` Δ | boot Δ |
|
||||
|---|---|---|---|---|
|
||||
| `+POSIX_MQUEUE` | +12 KB (+0.17%) | +4 KB (+0.02%) | +64 KB (+0.31%, page padding) | none (15-run mean within noise on nested boot) |
|
||||
|
|
|
|||
|
|
@ -1,5 +1,14 @@
|
|||
--- a/config-libkrunfw_x86_64
|
||||
+++ b/config-libkrunfw_x86_64
|
||||
@@ -51,7 +51,7 @@
|
||||
CONFIG_DEFAULT_HOSTNAME="(none)"
|
||||
CONFIG_SYSVIPC=y
|
||||
CONFIG_SYSVIPC_SYSCTL=y
|
||||
-# CONFIG_POSIX_MQUEUE is not set
|
||||
+CONFIG_POSIX_MQUEUE=y
|
||||
# CONFIG_WATCH_QUEUE is not set
|
||||
CONFIG_CROSS_MEMORY_ATTACH=y
|
||||
# CONFIG_USELIB is not set
|
||||
@@ -485,7 +485,7 @@
|
||||
|
||||
CONFIG_HAVE_KVM=y
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue