From: Stefano Stabellini Subject: RE: xl features missing Date: Tue, 20 Jul 2010 13:10:57 +0100 Message-ID: References: <53342289-b413-4334-9dea-4661c01eb58b@default> <1a260382-2e07-4045-8922-25d8c5cab29b@default> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Return-path: In-Reply-To: <1a260382-2e07-4045-8922-25d8c5cab29b@default> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Dan Magenheimer Cc: "xen-devel@lists.xensource.com" , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On Mon, 19 Jul 2010, Dan Magenheimer wrote: > What xl processes are racy for obtaining memory? Is it possible > that multiple xl processes are doing an "xl create" at the same time? Multiple users on the same host must be able to call "xl create" at the same time. > > I'm not sure I understand completely, but one possible issue is > that the function that asks "is there enough memory?" must not > actually tell tmem to surrender the memory. Also, tmem has > a "freeze/thaw" mechanism to ensure additional memory isn't > asynchronously absorbed (search for the instances of "tmem" > in balloon.py to see this code) and they must always be paired, > e.g. a freeze without a thaw is disastrous for tmem. > Note that other dynamic memory mechanisms (even plain ballooning) > don't have this freeze/thaw capability so there > is always the potential for races, e.g. for > > - Is there enough memory for a 1G domain? > - Yes, it appears there is enough so I will proceed > - Create the domain with 1G of memory > > the last step must be allowed to fail gracefully (preferably > with a decent error message). Indeed. We could also try to catch these errors and and go back to step one for a few times.