[Bug 293907] guest kernel fails to init when vcpus > available cpus set by cpuset
Date: Fri, 20 Mar 2026 16:39:49 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293907
John Baldwin <jhb@FreeBSD.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jhb@FreeBSD.org,
| |markj@FreeBSD.org
--- Comment #3 from John Baldwin <jhb@FreeBSD.org> ---
bhyve doesn't really handle oversubscribing of vCPUs to physical CPUs
unfortunately. Possibly Linux is able to cope with this better due to how it
launches APs, but I'm not sure the general problem is going to be solved in
bhyve anytime soon. In general, for example, if a vCPU is spinning on a spin
lock, you would like to be able to yield the host CPU for that vCPU to the vCPU
thread that holds the spin lock. However, a hypervisor can't really see that.
Possibly we could make some better choices around PAUSE.
AP startup is kind of a worst case for this and there is already one hack in
place to use a hardcoded sleep in userspace to keep the vCPU threads for APs
from constantly entering the kernel only to immediately exit before the INIT
IPI is sent, but the busy-wait loop the APs sit in after the INIT IPI isn't
helped by the sleep in userspace.
--
You are receiving this mail because:
You are the assignee for the bug.