Chris Lalancette
2007-Aug-24 18:21 UTC
[Xen-devel] [PATCH]: Xend: Balloon an additional 8MB for QEMU device model
All, Attached is a patch to make Xend balloon down an additional 8MB (for the Cirrus logic video device) when doing a restore or migrate. Without this, you can run into the following situation: 1) Start an HVM guest up on machine1 2) Boot up machine2, making sure dom0 has *all* of available memory 3) Migrate (off-line or live) from machine1 to machine2 4) Have the video device setup fail, with the following in the qemu-dm log file: Failed allocation for dom 3: 2048 extents of order 0 The problem ends up being that if dom0 has all of memory, the restore on the target side only balloons down exactly enough for the memory of the migrating domain; it doesn''t take into account the additional memory needed for the device model. So the "populate_physmap" that happens as part of video device setup fails with out-of-memory, causing the failure above. Note that it could be argued that this additional ballooning should be done from QEMU, since it knows better than anyone how much memory it is going to need. However, all of the logic for ballooning is currently contained in xend, so it seems like a more appropriate place to put it. The patch is against 3.1.0, but should apply fairly easily to xen-unstable. Signed-off-by: Chris Lalancette <clalance@redhat.com> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Chris Lalancette
2007-Aug-27 18:45 UTC
Re: [Xen-devel] [PATCH]: Xend: Balloon an additional 8MB for QEMU device model
Chris Lalancette wrote:> All, > Attached is a patch to make Xend balloon down an additional 8MB (for the > Cirrus logic video device) when doing a restore or migrate. Without this, you > can run into the following situation:All, Attached is an updated version of the patch. Dan Berrange correctly points out that this logic already exists in xend, when an HVM domain is being created; the logic just wasn''t being used in the restore path. This patch basically takes the logic from the creation path and pulls it into the restore path, so things work properly. Again, this patch is against 3.1.0, but should apply fairly easily to unstable. Signed-off-by: Chris Lalancette <clalance@redhat.com> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel