Skip to content

Mount binfmt before registration to shorten boot by about a second - #15175

Merged
dhh merged 1 commit into
quattrofrom
perf/binfmt-mount-before-registration
Oct 13, 2026
Merged

dhh merged 1 commit into
quattrofrom
perf/binfmt-mount-before-registration

Conversation

@dhh

@dhh dhh commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

systemd-binfmt.service orders itself after the binfmt mount but does not pull it into the boot transaction. On the tested Omarchy image, registration waits for the automount for almost a second. Pull the mount in explicitly so registration starts after it is ready. Preserve the automount's path and read/write conditions on the mount itself, including restricted container environments.

Five alternating control/candidate boots with omarchy-iso/test/vm-image/vm-boot, using the verified 2026.10.12.442 edge image:

Median Before After
Userspace startup 2.408 s 1.503 s
Binary-format registration service 992 ms 13 ms

Every boot reached running with no failed units and all 31 QEMU handlers registered. An ARM64 Alpine Docker container still ran successfully and reported aarch64. The same near-one-second binfmt delay is present in this development machine's boot journal; no host boot configuration was changed.

Claude reviewed the inherited units and the final drop-ins, with no remaining actionable findings. The drop-ins ship through the settings package's existing etc/ copy path, so they apply on the next boot for new and updated installations.

Built a fresh ISO using omarchy-iso-make --local-source and ran the ISO repository’s unattended installation plus boot integration test: passed, with no failed units. A further boot confirmed both final drop-ins were installed, all 31 QEMU formats were registered, and binfmt registration took 6.4 ms. The fresh-ISO boot includes UEFI and Limine; the alternating benchmark above uses the tool’s direct-kernel boot. Keep this PR unmerged.

@dhh
dhh marked this pull request as ready for review October 12, 2026 14:42
@greptile-apps

greptile-apps Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[High impact] The code appears safe to merge, but the author explicitly requests that the PR remain unmerged.

Summary

Pulls proc-sys-fs-binfmt_misc.mount into boot before binary-format registration.

  • Binary-format registration starts after its mount is ready.

Reviews (1) · Last reviewed commit: "Mount binfmt before registering binary f..." · Reviewed by Greptile

@dhh
dhh merged commit d100314 into quattro Oct 13, 2026
1 check passed
@dhh
dhh deleted the perf/binfmt-mount-before-registration branch October 13, 2026 00:55
@emirb emirb added this to the 4.5 milestone Oct 17, 2026
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.

2 participants