oxidecomputer / oxidecomputer/propolis
unbound vCPUs make for contentious cyclic juggling in vm_run
@iximeow is already working on this.
Since Dec 15, 2025.
- 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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.