]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xen-swiotlb: Retry up three times to allocate Xen-SWIOTLB
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Fri, 22 Jul 2011 16:46:43 +0000 (12:46 -0400)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Tue, 4 Dec 2012 17:32:51 +0000 (12:32 -0500)
commit600a01c6759af29f4b5f6c65a67ed7646aa8cf0f
tree8cf2157eabbc7533b8605226d27047cc814d847b
parentaf8215b50f8562801580e35921e50bff036f321d
xen-swiotlb: Retry up three times to allocate Xen-SWIOTLB

We can fail seting up Xen-SWIOTLB if:
 - The host does not have enough contiguous DMA32 memory available
   (can happen on a machine that has fragmented memory from starting,
   stopping many guests).
 - Not enough low memory (almost never happens).

We retry allocating and exchanging the swath of contiguous memory
up to three times. Each time we decrease the amount we need  - the
minimum being of 2MB.

If we compleltly fail, we will print the reason for failure on the Xen
console on top of doing it to earlyprintk=xen console.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
(cherry picked from commit f4b2f07b2ed9b469ead87e06fc2fc3d12663a725)
drivers/xen/swiotlb-xen.c