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/
Home Products Support Community News


[Xen-changelog] [linux-2.6.18-xen] xen: swiotlb allocations do not need

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] xen: swiotlb allocations do not need to come from low memory
From: "Xen patchbot-linux-2.6.18-xen" <patchbot-linux-2.6.18-xen@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 20 Mar 2009 08:25:02 -0700
Delivery-date: Fri, 20 Mar 2009 08:25:09 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1237539658 0
# Node ID 87c84f7dd8507edc58c13f1debfad5a05aa03128
# Parent  0a9cdf1dbad6127156609dcf389afeac09081210
xen: swiotlb allocations do not need to come from low memory

Other than on native, where using the _low variants of alloc_bootmem()
is indeed a requirement for swiotlb, on Xen this is not needed. Using
the _low variants has the potential of preventing systems from booting
when they have lots of memory, due to the way the bootmem allocator
works: It allocates memory from bottom to top. Thus, if other large
(but not _low) allocations (memmap, large system hash tables)
mostly consume the memory below 4Gb, the swiotlb allocations can
fail. (This is equally so for native, but cannot be that easily fixed

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
 lib/swiotlb-xen.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff -r 0a9cdf1dbad6 -r 87c84f7dd850 lib/swiotlb-xen.c
--- a/lib/swiotlb-xen.c Thu Mar 19 13:48:52 2009 +0000
+++ b/lib/swiotlb-xen.c Fri Mar 20 09:00:58 2009 +0000
@@ -151,7 +151,7 @@ swiotlb_init_with_default_size (size_t d
         * Get IO TLB memory from the low pages
-       iotlb_virt_start = alloc_bootmem_low_pages(bytes);
+       iotlb_virt_start = alloc_bootmem_pages(bytes);
        if (!iotlb_virt_start)
                panic("Cannot allocate SWIOTLB buffer!\n");
@@ -196,7 +196,7 @@ swiotlb_init_with_default_size (size_t d
         * Get the overflow emergency buffer
-       io_tlb_overflow_buffer = alloc_bootmem_low(io_tlb_overflow);
+       io_tlb_overflow_buffer = alloc_bootmem(io_tlb_overflow);
        if (!io_tlb_overflow_buffer)
                panic("Cannot allocate SWIOTLB overflow buffer!\n");

Xen-changelog mailing list

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [linux-2.6.18-xen] xen: swiotlb allocations do not need to come from low memory, Xen patchbot-linux-2.6.18-xen <=