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 03 of 38] swiotlb: allow architectures tooverride

To: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Subject: Re: [Xen-devel] [PATCH 03 of 38] swiotlb: allow architectures tooverride swiotlb pool allocation
From: Chris Lalancette <clalance@xxxxxxxxxx>
Date: Mon, 17 Nov 2008 09:04:23 +0100
Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Ian Campbell <ian.campbell@xxxxxxxxxx>, the arch/x86 maintainers <x86@xxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, Ingo Molnar <mingo@xxxxxxx>
Delivery-date: Mon, 17 Nov 2008 00:05:30 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <491DD27A.30707@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: <patchbomb.1226603398@xxxxxxxxxxxxxxxxx> <e9f25b3bb6625ee88f9f.1226603401@xxxxxxxxxxxxxxxxx> <491D4C89.76E4.0078.0@xxxxxxxxxx> <491DD27A.30707@xxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.16 (X11/20080723)
Jeremy Fitzhardinge wrote:
>> While perhaps less intrusive to take care of, I also didn't see an equivalent
>> of the range_straddles_page_boundary() logic, without which I can't see
>> how this would work in the common case.
>>   
> Could you be more specific?  The swiotlb allocation should be machine 
> contiguous and so there's no stradding required, but I think I'm missing 
> your point.

In general, I think you are right; swiotlb should be machine contiguous, so it
works in the normal case.  The range_straddles_page_boundary function takes care
of a corner case, where you can run into swiotlb exhaustion when you really
shouldn't.  As I understand it, it comes about because it is possible to get a
swiotlb request with two pages that just happen to be machine contiguous, but
were *not* allocated through xen_create_contiguous_region (and hence weren't
marked in the contiguous_bitmap as such).  In this case, you split the request
into two separate requests, and this can more easily lead to exhaustion.
range_straddles_page_boundary works around this by checking whether any two
pages coming through the swiotlb layer are machine contiguous, and if they are,
not splitting the request.

-- 
Chris Lalancette

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

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