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]: Better checking in range_straddles_page_boundar

To: Chris Lalancette <clalance@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH]: Better checking in range_straddles_page_boundary
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Wed, 22 Oct 2008 11:47:03 +0100
Cc:
Delivery-date: Wed, 22 Oct 2008 03:47:26 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <48FEECE3.207@xxxxxxxxxx>
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Ack0M4Siwv280qAmEd2kCAAX8io7RQ==
Thread-topic: [Xen-devel] [PATCH]: Better checking in range_straddles_page_boundary
User-agent: Microsoft-Entourage/11.4.0.080122
On 22/10/08 10:05, "Chris Lalancette" <clalance@xxxxxxxxxx> wrote:

>     Attached is a simple patch to slightly rework the logic in
> range_straddles_page_boundary().  The reason for this is to avoid a crash we
> are
> seeing on 32-bit dom0.  Basically, the contiguous_bitmap is allocated based on
> max_low_pfn.  However, the swiotlb code can be passed a request (in
> swiotlb_map_sg) that is > 1 page (I've seen 2 pages), and is also a page
> (sg->page) > max_low_pfn.  If this combination happens, then you get a fatal
> page fault when doing the test_bit(pfn, contiguous_bitmap).  For that reason,
> rework the logic in range_straddles_page_boundary so that if it gets a request
> >
> 1 page, and it's above max_low_pfn, then we force the splitting of the
> request.
>  In our testing, this seems to fix the issue.

How about we just get rid of the contiguous_bitmap? We might as well if you
are going to push that check after calling
check_pages_physically_contiguous(), since no extent which is acceptable to
contiguous_bitmap should fail on check_pages_physically_contiguous(). I
think I kept contiguous_bitmap only as a fast check before calling that
slower function.

 -- Keir




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

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