From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: Restart domU failure (memory allocation issue) Date: Thu, 13 Mar 2014 19:48:42 +0000 Message-ID: <53220B9A.50508@linaro.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Oleksandr Tyshchenko , "xen-devel@lists.xen.org" Cc: Tim Deegan , Ian Campbell , Andrii Anisov , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org (Adding ARM people in CC) On 13/03/14 18:33, Oleksandr Tyshchenko wrote: > Hello, all. Hello Oleksandr, > I am working with DRA7 (OMAP5) platform and I am using XEN 4.4 and > Kernel 3.8 for both domains. > As we still have 1:1 mapping for domU we need to allocate memory (1024 > MB in our case) for it at one chunk. > > The issue is that I can't create domain again after destroying it (I > am destroying domain by a "xl destroy" command) because we no longer > have contiguous memory region and as result allocation failed. > > It seems, we have memory leak. I see that not all memory is freed > after domain destroy. > I see that some pages (which were allocated for kernel segment) don't > returned to the heap. I gave a try on Xen 4.4 with normal guest (e.g without the 1:1 mapping) and I don't find any memory leaks. How do you create the 1:1 mapping for the guest? > / # xl list > Name ID Mem VCPUs State Time(s) > Domain-0 0 128 2 r----- 4.1 > (null) 1 5 2 --p--d 0.9 It seems that your domain is not completely destroyed. It may be because some pages still belongs to the domain. Xen will free a page only when the reference count is 0, do you have keep some mapping in dom0? (for instance in libxl). Regards, -- Julien Grall