Skip to content

linux: run embedded Firecracker with virtio-pmem#18

Draft
dzbarsky wants to merge 2 commits into
mainfrom
zbarsky/linux-firecracker-pmem
Draft

linux: run embedded Firecracker with virtio-pmem#18
dzbarsky wants to merge 2 commits into
mainfrom
zbarsky/linux-firecracker-pmem

Conversation

@dzbarsky

Copy link
Copy Markdown
Member

Author: zbarsky-bot

Builds Firecracker 1.16.0 from source with rules_rs, embeds Firecracker in linux-actiond, attaches the persistent cas.ext4 file as PCI virtio-pmem, and mounts /dev/pmem0 as ext4 with dax=always,nobarrier. The runtime SquashFS remains a PCI virtio block device. vm/linux.config and vm/linux_x86_64.config enable the libnvdimm, PMEM, DAX, memory hotplug, and architecture-specific options required by /dev/pmem0.

CONFIG_NVDIMM_PFN=y is required because it selects CONFIG_ND_CLAIM; without CONFIG_ND_CLAIM, devm_namespace_enable() returns -ENXIO and Linux does not create /dev/pmem0.

The LLVM llvm-tblgen smoke executed 1,998 actions in both configurations. PCI virtio-pmem with ext4 DAX measured 289.431s actiond / 274.500s Linux host, while PCI virtio-blk measured 287.837s actiond / 293.087s Linux host. The +1.594s (+0.55%) actiond delta provides no measured PMEM performance improvement; this PR preserves the implementation as an alternative configuration.

The Linux x86_64 LLVM smoke, Linux ARM64 build, and release build completed successfully in GitHub Actions run 27480307956 before the remaining Windows smoke was canceled.

dzbarsky added 2 commits June 13, 2026 15:44
Build Firecracker 1.16.0 with rules_rs for ARM64 and x86_64. Embed Firecracker, the Linux kernel, the initramfs, and the runtime SquashFS in linux-actiond; copy the immutable files to sealed memfds and execute Firecracker with execveat. Keep cas.ext4 as the only persistent file and attach cas.ext4 and the runtime SquashFS as PCI virtio block devices.

Proxy REAPI requests through Firecracker's Unix-vsock backend. Add ARM64 and x86_64 release binaries, an x86_64 KVM LLVM smoke comparison against the Linux host, and an ARM64 release build on the GitHub ARM64 runner.
Expose cas.ext4 through PCI virtio-pmem and mount /dev/pmem0 with ext4 DAX. Keep the runtime SquashFS on virtio-blk, validate Firecracker's 2 MiB pmem alignment, and wait for libnvdimm's asynchronous pmem block-device registration. Use nobarrier to retain the existing Unsafe persistence semantics.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant