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] dom0 pvops crash

To: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] dom0 pvops crash
From: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Date: Mon, 25 Jan 2010 12:02:45 -0800
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>, Pasi Kärk
Delivery-date: Mon, 25 Jan 2010 12:03:04 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <C783A22C.7599%keir.fraser@xxxxxxxxxxxxx>
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: <C783A22C.7599%keir.fraser@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.7) Gecko/20100120 Fedora/3.0.1-1.fc12 Thunderbird/3.0.1
On 01/25/2010 11:31 AM, Keir Fraser wrote:
On 25/01/2010 19:00, "Jeremy Fitzhardinge"<jeremy@xxxxxxxx>  wrote:

On 01/25/2010 10:57 AM, Keir Fraser wrote:
Perhaps we need a branch in the git repo that includes just-get-it-working
patches? Aren't we going to have a 4.0 stable branch anyway, which would do
the trick?

Yeah.  I don't think there's an upstreamable fix, but we can hack
something together to make it work.
Hm, do you mean 'we don't currently have an upstreamable fix', or 'there is
no possible upstreamable fix now or ever'?

I'll need to refresh my memory for the precise details, but the basic problem is that there's a path in the pagefault code where the kernel breaks its own locking rules by kmapping a high pte page without holding the pagetable lock. In the native case this is OK, but it breaks Xen because the pte page can be unpinned at that point, but can race with it being pinned on another CPU.This can fail in several ways, depending on the exact timing: the other CPU's pin could fail because of the writable kmapping, or the writable kmap could fail because the page has since become pinned.

The brute-force fix is to lock the pte page properly, but given that its in the hot part of the pagefault path, and the unlocked access is presumably a performance enhancement, I don't think that will fly.

IanC, Pasi, myself and others explored a number of other ways to try and fix it in the Xen pvops code, but they all turned out to be very expensive, just not work (they just pushed the race around), or require new pvops just for this case. Given that HIGHPTE is generally a bad idea and should be deprecated (any machine big enough to need it should definitely be running a 64-bit kernel), I've left it on the backburner hoping for some inspiration to strike. So far it has not.

    J

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