ia64/linux-2.6.18-xen.hg

changeset 844:87c84f7dd850

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
there.)

Signed-off-by: Jan Beulich <jbeulich@novell.com>
author Keir Fraser <keir.fraser@citrix.com>
date Fri Mar 20 09:00:58 2009 +0000 (2009-03-20)
parents 0a9cdf1dbad6
children 4c7eb2e71e9d
files lib/swiotlb-xen.c
line diff
     1.1 --- a/lib/swiotlb-xen.c	Thu Mar 19 13:48:52 2009 +0000
     1.2 +++ b/lib/swiotlb-xen.c	Fri Mar 20 09:00:58 2009 +0000
     1.3 @@ -151,7 +151,7 @@ swiotlb_init_with_default_size (size_t d
     1.4  	/*
     1.5  	 * Get IO TLB memory from the low pages
     1.6  	 */
     1.7 -	iotlb_virt_start = alloc_bootmem_low_pages(bytes);
     1.8 +	iotlb_virt_start = alloc_bootmem_pages(bytes);
     1.9  	if (!iotlb_virt_start)
    1.10  		panic("Cannot allocate SWIOTLB buffer!\n");
    1.11  
    1.12 @@ -196,7 +196,7 @@ swiotlb_init_with_default_size (size_t d
    1.13  	/*
    1.14  	 * Get the overflow emergency buffer
    1.15  	 */
    1.16 -	io_tlb_overflow_buffer = alloc_bootmem_low(io_tlb_overflow);
    1.17 +	io_tlb_overflow_buffer = alloc_bootmem(io_tlb_overflow);
    1.18  	if (!io_tlb_overflow_buffer)
    1.19  		panic("Cannot allocate SWIOTLB overflow buffer!\n");
    1.20