Skip to content

Backport #139 to 6.18-lts: fix(xen): block in stop_machine while a vCPU is not running - #142

Merged
alexandermerritt merged 1 commit into
edera/6.18-ltsfrom
backport/edera-6.18-lts/pr-139
Dec 2, 2026
Merged

alexandermerritt merged 1 commit into
edera/6.18-ltsfrom
backport/edera-6.18-lts/pr-139

Conversation

@edera-rebase-app

Copy link
Copy Markdown

Backport of #139 from edera/mainline to edera/6.18-lts (79b32c529f09), prepared by Claude. Run log.

Merge with Rebase and merge, so edera/6.18-lts stays linear.

Independent checks

Builds: success (x86_64 and arm64 vmlinux with the Edera features built in).

LTS tip before 79b32c529f09
LTS tip after 2d48e6e996cb
Commits requested 1
  • New branch fast-forwards the LTS tip.
  • Backported commits are linear.
  • All 1 requested commits backported in order, each with its source's subject and identical +/- lines.

Claude's report

Claude left no report (backport step: success).

Builds are still running (output is piped through `tail`, so nothing shows until they finish). I'll wait for their completion notifications before writing the report.

Under a credit2 cap, Xen parks a domain's vCPUs when its budget runs
out. CPUs spinning in multi_cpu_stop() then use the budget that a
parked vCPU needs to reach the next step, so taking a vCPU offline, at
boot on PV or when the vCPU count is lowered, slows down sharply as the
cap shrinks.

Implement stop_machine_yield() for x86 Xen guests, like for s390: while
a CPU taking part is not running, block in Xen with SCHEDOP_poll and a
short timeout instead of spinning.

Guests on KVM's Xen emulation are not supported: KVM reads the
SCHEDOP_poll timeout as relative, unlike Xen, and wakes a poller with
interrupts off on few events, so a waiter there can sleep for a very
long time and stop_machine can hang once the host preempts a vCPU.

Signed-off-by: Alexander M. Merritt <alexander@edera.dev>
(cherry picked from commit e899db9)
@alexandermerritt
alexandermerritt merged commit 75031b3 into edera/6.18-lts Dec 2, 2026
2 checks passed
@github-actions
github-actions Bot deleted the backport/edera-6.18-lts/pr-139 branch December 2, 2026 22:17
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