All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Keir Fraser <keir.fraser@eu.citrix.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	"Ian Jackson" <Ian.Jackson@eu.citrix.com>
Subject: Re: dom0 pvops crash
Date: Mon, 25 Jan 2010 12:02:45 -0800	[thread overview]
Message-ID: <4B5DF8E5.9040906@goop.org> (raw)
In-Reply-To: <C783A22C.7599%keir.fraser@eu.citrix.com>

On 01/25/2010 11:31 AM, Keir Fraser wrote:
> On 25/01/2010 19:00, "Jeremy Fitzhardinge"<jeremy@goop.org>  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

  reply	other threads:[~2010-01-25 20:02 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-25 16:29 dom0 pvops crash Ian Jackson
2010-01-25 17:10 ` Keir Fraser
2010-01-25 17:28   ` Ian Jackson
2010-01-25 17:54   ` Pasi Kärkkäinen
2010-01-25 18:03     ` Ian Jackson
2010-01-25 18:57       ` Keir Fraser
2010-01-25 19:00         ` Jeremy Fitzhardinge
2010-01-25 19:31           ` Keir Fraser
2010-01-25 20:02             ` Jeremy Fitzhardinge [this message]
2010-01-26 11:53               ` Jan Beulich
2010-01-27 17:26               ` Ian Campbell
2010-01-27 18:50                 ` Jeremy Fitzhardinge
2010-01-27 19:18                   ` Ian Campbell
2010-01-27 19:34                     ` Jeremy Fitzhardinge
2010-01-27 20:03                       ` Pasi Kärkkäinen
2010-01-27 20:07                         ` Jeremy Fitzhardinge
2010-02-07 19:35                 ` Pasi Kärkkäinen
2010-02-07 21:42                   ` Ian Campbell
2010-02-07 22:22                     ` Daniel Stodden
2010-02-08  7:41                       ` Pasi Kärkkäinen
2010-02-08  7:47                         ` Ian Campbell
2010-02-08  8:06                           ` Pasi Kärkkäinen
2010-02-08  8:50                             ` Ian Campbell
2010-02-08  8:57                               ` Pasi Kärkkäinen
2010-02-08 12:57                                 ` Xen pvops kernel CONFIG_HIGHPTE race/crash Pasi Kärkkäinen
2010-02-08 17:34                                   ` Pasi Kärkkäinen
2010-02-09  9:14                                     ` Ian Campbell
2010-01-25 18:18     ` dom0 pvops crash Ian Pratt
2010-01-25 18:26       ` Ian Campbell
2010-02-02 10:23         ` Pasi Kärkkäinen
2010-02-02 10:31           ` Ian Campbell
2010-02-02 10:45             ` Pasi Kärkkäinen
2010-01-25 17:11 ` Pasi Kärkkäinen
2010-01-25 17:30   ` Ian Jackson
2010-01-25 17:42     ` Pasi Kärkkäinen
2010-01-26 13:45   ` Ian Jackson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B5DF8E5.9040906@goop.org \
    --to=jeremy@goop.org \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=keir.fraser@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.