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 10/27] xen: make sure swiotlb allocation isphysic

To: "Jeremy Fitzhardinge" <jeremy@xxxxxxxx>, "H. Peter Anvin" <hpa@xxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH 10/27] xen: make sure swiotlb allocation isphysically contigious
From: "Jan Beulich" <jbeulich@xxxxxxxxxx>
Date: Mon, 16 Mar 2009 13:30:22 +0000
Cc: David Airlie <airlied@xxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Jeremy Fitzhardinge <jeremy.fitzhardinge@xxxxxxxxxx>, the arch/x86 maintainers <x86@xxxxxxxxxx>, Linux Kernel Mailing List <linux-kernel@xxxxxxxxxxxxxxx>
Delivery-date: Mon, 16 Mar 2009 06:30:05 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1236963612-14287-11-git-send-email-jeremy@xxxxxxxx>
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1236963612-14287-1-git-send-email-jeremy@xxxxxxxx> <1236963612-14287-11-git-send-email-jeremy@xxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
>>> Jeremy Fitzhardinge <jeremy@xxxxxxxx> 13.03.09 17:59 >>>
> void * __init swiotlb_alloc_boot(size_t size, unsigned long nslabs)
> {
>-      return alloc_bootmem_low_pages(size);
>+      void *ret = alloc_bootmem_low_pages(size);
>+
>+      if (ret && xen_pv_domain())
>+              xen_swiotlb_fixup(ret, size, nslabs);
>+
>+      return ret;
> }
 
While on native using alloc_bootmem_low_pages() is a requirement here,
on Xen this should explicitly not be used, as we realized just a couple of
days ago: The way the bootmem allocator works, running out of space
below 4Gb is pretty easy on machines with lots of memory, and since the
swiotlb is a requirement for Dom0, the risk of allocation failures must be
kept as low as possible.

Jan


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

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