Skip to content

image: udev's coldplug keeps cpu, so a core attached before systemd comes online - #258

Merged
aledbf merged 1 commit into
mainfrom
coldplug-cpu
Nov 14, 2026
Merged

aledbf merged 1 commit into
mainfrom
coldplug-cpu

Conversation

@aledbf

@aledbf aledbf commented Nov 14, 2026

Copy link
Copy Markdown
Member

What

udev's coldplug (10-coldplug.conf, filtered in 630fa2c) replays cpu again.

Why

spin boots every machine with one core and attaches the workspace's others while its own init is PID 1, before systemd and udev start. What onlines them is udev's coldplug replaying their add to 40-spin-hotadd.rules. The filter left cpu out, so with v20261113.03 and v20261114.01 every workspace comes up with one core whatever it was sized to: spin's kvm run 43527839765 failed four tests with "still waiting for the guest to have its floor's two cores".

How it is held

  • task boot:hotadd (TestACoreAttachedBeforeSystemdStartsComesOnline): an init that waits for a second core, the host attaches one over QMP, systemd starts, and a unit reads /sys/devices/system/cpu/online. On the image main builds today: present: 0-1 online: 0, failed. On this branch's image: present: 0-1 online: 0-1, passed. Both on a laptop under KVM.
  • image/build.sh refuses an image whose filter has no --subsystem-match=cpu, as it does for input.

Not done

  • What cpu in the replay costs the first login was not measured; it is one device per core. Worth one boot:ssh-first run on the bench fleet against 630fa2c's 436 -> 402 ms.
  • boot:hotadd is not in a workflow: compat.yml boots the previous release's image, which would fail it until a release carries this.

spin needs a release with this and a new pin.

🤖 Generated with Claude Code

…omes online

The coldplug filtered in 630fa2c replays block, net, virtio, misc, input, rtc,
ptp and ttyS0, and not cpu. A core attached while a consumer's init is PID 1 has
no udev to see it arrive: what onlines it is that replay reaching
40-spin-hotadd.rules. With v20261113.03 every spin workspace came up with one
core whatever it was sized to (spin's kvm run 43527839765).

task boot:hotadd attaches a core before systemd starts and reads the guest's
online cores after: 0 on v20261113.03's image, 0-1 with this. image/build.sh
refuses an image whose filter lost cpu, as it does input.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@aledbf
aledbf merged commit 9cb49ae into main Nov 14, 2026
3 checks passed
@aledbf
aledbf deleted the coldplug-cpu branch November 14, 2026 01:08
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