[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v3 1/3] libxl: xl mem-max et consortes must update static-max in xenstore too [and 1 more messages]
Daniel Kiper writes ("Re: [Xen-devel] [PATCH v3 1/3] libxl: xl mem-max et consortes must update static-max in xenstore too"): > On Tue, Apr 09, 2013 at 03:18:10PM +0100, Ian Jackson wrote: > > Daniel Kiper writes ("Re: [Xen-devel] [PATCH v3 1/3] libxl: xl mem-max et > > consortes must update static-max in xenstore too"): > > > That is why I think that static-max should be unconditionally > > > changed or the guest should write something in xenstore to inform > > > that it supports memory hotplug and relevant check should be waived. > > > > Right. I don't see what any of that has to do with "xl mem-max" > > though. The purpose of xl mem-max is to update the guest's > > enforcement limit. > > ...and static-max if you would like to use memory hotplug in real. > If not, then xl mem-set does not allow you to allocate more memory > to a guest than static-max. You seem to be losing sight of the purpose of the static-max key in xenstore. It is for the benefit of the toolstack - and, indirectly, the user - so that we know the maximum amount of memory we can ask the guest to us. Daniel Kiper writes ("Re: [Xen-devel] [PATCH v3 3/3] xl: Improve xl documentation in regards to guest memory management"): > No, memory hotplug should not change "static maximum" in any case. Why shouldn't it ? > "static maximum" should define memory limit for a given guest. > If "static maximum" is above "build maximum" then memory hotplug > in the guest should be involved (if it is available). If a guest supports memory hotplug, does it simply hotplug more memory response to changes in target ? Is there not a limit on how much memory hotplug a guest can cope with ? Perhaps the guest should advertise its actual maximum ? > > No, because a guest which is being asked to shrink will experience > > memory allocation failures if it doesn't shrink monotonically. > > IIRC if you shrink memory for a given guest and it does not have > memory balloon driver installed nothing happens. Yes. > I did not tested it but it would be crazy when host could steal > random page from the guest without its acceptance. It can't steal memory from the guest. But if the guest does any operation which allocates memory, when it is above the limit, that operation can fail. So for example consider a guest with a balloon driver (but without memory hotplug) which was booted with 1G and subsequently ballooned down to 768M. If the user says "xl mem-set blah 512M" then the limit and target are both set to 512M. If the guest's balloon driver, instead of shrinking the guest as it is supposed to, tries to allieviate some memory pressure inside the guest by allocating _more_ memory from Xen, that allocation will fail. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |