From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: xm mem-max and mem-set Date: Thu, 13 Apr 2006 20:48:48 -0500 Message-ID: <443EFF80.7060005@us.ibm.com> References: <443EB5A6.E57C.0030.0@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <443EB5A6.E57C.0030.0@novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ky Srinivasan Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Ky Srinivasan wrote: > It appears that these commands (and code backing these commands) do no > sanity checking and could potentially get the system to crash if the > values picked are not appropriate. For instance one can set the mem-max > value to a value that appears reasonable and basically render the > machine unusable. Consider the case where max value being set is less > than what is currently allocated to the domain. All subsequent > allocations will fail and these failures are considered fatal in Linux > (look at hypervisor.c). Once the domain is up, does it even make sense > to lower the max_mem parameter without risking crashing the system? > Minimally, we should ensure that the mem_max value is at least equal to > what the current domain allocation is. I have a trivial patch to xen > that implements this logic. This patch fixes a bug we have in our > bugzilla against SLES10. Would there be interest in such a patch. > I'm slightly concerned about the subtle race condition it would introduce. If there's no reason to set max-mem below current reservation (if it causes crashes which I don't really understand why it would) then I think it would be something best enforced within the hypervisor. Why, exactly, would setting max-mem below the current reservation cause problems in the guest? I guess it may fail because of grant transfer ops (in which case, we really ought to enforce it at the hypervisor level). Regards, Anthony Liguori > Regards, > > K. Y > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel >