oxidecomputer / oxidecomputer/propolis

unbound vCPUs make for contentious cyclic juggling in vm_run

Open
#984 2 comments 0 reactions 1 assignee View on GitHub

@iximeow is already working on this.

Since Dec 15, 2025.

local storage
Dominant language
Rust
Stars
270
Forks
42
Avg merge
4d 5h
Merged PRs (30d)
6

Description

over in byhve, vm_run tries to make sure that vCPU-specific resources (cyclics, etc) are kept on the same CPU as whichever is current. vm_localize_resources makes this happen, and up at the top of that is if (vcpu->lastloccpu == curcpu). if we're not on the same CPU, we'll have to move resources (such as vlapic_localize_resources moving a cyclic), and in the case of vlapic_localize_resources that's serialized through cpu_lock.

on a largeish system (256 threads) with a largeish VM (192 vCPUs), we're limited at somewhere in the range of 500-700k vm_run()/second because of this(!)

while we don't want to be doing 500-700k interrupts/second, ideally, we can save a bunch of system time by binding vCPUs to physical CPUs and ensuring if (vcpu->lastloccpu == curcpu). at the very least, perhaps binding vCPU threads to a smaller CPU group so the odds are improved.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.