Skip to content

image: no hot-add rule for memory, which the kernel onlines itself - #238

Merged
aledbf merged 1 commit into
mainfrom
hotadd-memory-rule
Nov 12, 2026
Merged

aledbf merged 1 commit into
mainfrom
hotadd-memory-rule

Conversation

@aledbf

@aledbf aledbf commented Nov 12, 2026

Copy link
Copy Markdown
Member

Closes #230

A workspace that grew through virtio-mem logged, for every block, 40-spin-hotadd.rules:23 ATTR{state}="online": Failed to write "online" ... Invalid argument. The kernel onlines each hot-added block itself - memhp_default_state=online is on every command line (machine/cmdline.go:138, unconditional) - and a block's add event goes out before that step, so udev's write arrived after the kernel's and state_store answered EINVAL for a block already online. No memory was lost; the console filled with false failures.

The memory line goes; the CPU line stays, with a comment saying why memory has no rule. spin names the rule only for CPUs (checked: AGENTS.md, vmm, hotplug/cpu, handoff, the image integration test's SUBSYSTEM=="cpu" check).

task lint and task test pass. Not built into an image nor booted here; the repository has no boot test that grows memory through virtio-mem, so the issue's "udevd logged no failure" check has nowhere to go yet.

🤖 Generated with Claude Code

memhp_default_state=online is always on the command line (machine/cmdline.go),
so the kernel onlines every virtio-mem block itself. The block's add uevent
leaves before that, udev read it offline and wrote "online" after the kernel
had, and udevd logged an EINVAL failure for every block a workspace grew by.
The CPU line stays: nothing else onlines a hot-added core.

Closes #230

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@aledbf
aledbf merged commit 3c8da99 into main Nov 12, 2026
3 checks passed
@aledbf
aledbf deleted the hotadd-memory-rule branch November 12, 2026 05:42
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.

The hot-add rule writes "online" to memory the kernel already onlined, and udev logs a failure for every block a workspace grows by

1 participant