bhyve should allocate guest memory lazily
For the initial porting effort of bhyve, the way we shimmed allocation for guest physical memory regions is with equally sized (read: gigantic)
kmem_alloc() calls. For small guests on systems without memory pressure, it's simple and works OK, but the model starts to suffer with larger guests and in the face of memory pressure.
In particular, it means allocating and zeroing literally all of guest memory at the time of VM creation, which can be very expensive. Without exposing ourselves to the challenges of swap-able guest memory (and the performance dangers of overcommit there), it would be nice if instances could "demand-page" their guest-physical allocations over a longer period, while the VM is up and running.
Updated by Patrick Mooney 10 months ago
- Status changed from In Progress to Closed
- Assignee deleted (
With the integration of #13833, the situation for guest memory allocation changed significantly. It may be that lazy allocation is desired or needed in the future. This can be revisited then.