From: Keir Fraser Subject: Re: xm mem-max and mem-set Date: Fri, 14 Apr 2006 07:55:28 +0100 Message-ID: <67059ea5b92406ec3088a510b888af69@cl.cam.ac.uk> References: <443EB5A6.E57C.0030.0@novell.com> <443EFF80.7060005@us.ibm.com> Mime-Version: 1.0 (Apple Message framework v623) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <443EFF80.7060005@us.ibm.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: Anthony Liguori Cc: Ky Srinivasan , xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On 14 Apr 2006, at 02:48, Anthony Liguori wrote: > 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). xen_create_contiguous_region() will get *quite* upset if it gives up memory pages to Xen in good faith and gets nothing in return. :-) Not allowing max allocation to be set lower than current allocation sounds like a sensible enforcement for the hypervisor, and I think that should avoid crashes. -- Keir