WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [patch] kexec is not highmem-aware

To: "Stephen C. Tweedie" <sct@xxxxxxxxxx>
Subject: Re: [Xen-devel] [patch] kexec is not highmem-aware
From: Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx>
Date: Mon, 18 Jun 2007 16:11:50 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Gerd Hoffmann <kraxel@xxxxxxxxxx>
Delivery-date: Mon, 18 Jun 2007 08:10:03 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <1182176957.21966.9.camel@xxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1182176957.21966.9.camel@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Mon, 2007-06-18 at 15:29 +0100, Stephen C. Tweedie wrote:
> The problem is in kimage_alloc_pages(), which tries to return contiguous
> pages by calling 
> 
>       xen_create_contiguous_region((unsigned long)page_address(pages),
>                                        order, address_bits)
> 
> on the pages allocated.  Unfortunately, page_address() returns NULL for
> highmem pages.  So as soon as we try this on a page in the highmem heap,
> we get the above OOPS.

The intention of this call is actually to ensure that the MFNs are below
the limit imposed by the limit argument rather than to make a contiguous
region so it is still required for order 0 allocations.

Without this guarantee trying to load a crash kernel results in an OOM
due to the check of mfn vs KEXEC_CONTROL_MEMORY_LIMIT in
kimage_alloc_normal_control_pages(). There is similar check vs
KEXEC_SOURCE_MEMORY_LIMIT in kimage_alloc_page(). It's possible (even
likely with large hosts) for a domain to have no pages which satisfy
these constraints so without the xen_create_contiguous_region it sucks
up all memory and OOMs.

This was introduced with xen-unstable.hg 14372:a1daade92952

I guess xen_create_contiguous_region is happy to operate on a
temporarily kmapped page which are immediately unmapped since we only
care that the MFN has been moved below the limit.

Ian.



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>