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.
No data to display