All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Vrabel <david.vrabel@citrix.com>
To: Wei Liu <wei.liu2@citrix.com>, <linux-kernel@vger.kernel.org>,
	<mgorman@suse.de>, <akpm@linux-foundation.org>,
	<hughd@google.com>
Cc: <xen-devel@lists.xen.org>, <konrad.wilk@oracle.com>,
	Boris Ostrovsky <boris.ostrovsky@oracle.com>
Subject: Re: Pte_special broken on Xen PV when NUMA balancing is enabled
Date: Wed, 5 Nov 2014 16:57:36 +0000	[thread overview]
Message-ID: <545A5700.20902@citrix.com> (raw)
In-Reply-To: <20141105164141.GA27834@zion.uk.xensource.com>

On 05/11/14 16:41, Wei Liu wrote:
> Hi all
> 
> I'm developing virtual NUMA support for Xen. One thing I notice is that when
> NUMA balancing is enabled, kernel will crash with following backtrace.
> 
> [  404.281396] CPU: 0 PID: 1058 Comm: dd Tainted: G    B   W      3.18.0-rc3-bp+ #3
> [  404.281403]  0000000000000000 00007fd62eca3000 ffffffff817b7cac ffff880172d298b8
> [  404.281415]  ffffffff8110383f 0720072007300732 00000007fd62eca3 0720072007200720
> [  404.281426]  ffff880172d298b8 ffff88017300bbb0 00007fd62eca3000 0000000000000000
> [  404.281437] Call Trace:                                                      
> [  404.281444]  [<ffffffff817b7cac>] ? dump_stack+0x41/0x51                     
> [  404.281452]  [<ffffffff8110383f>] ? print_bad_pte+0x19f/0x1cb                
> [  404.281460]  [<ffffffff81104479>] ? vm_normal_page+0x51/0x87                 
> [  404.281469]  [<ffffffff8110c5ef>] ? change_protection+0x4fb/0x76a            
> [  404.281477]  [<ffffffff81106435>] ? handle_mm_fault+0x9e0/0xa11              
> [  404.281486]  [<ffffffff8111cc22>] ? change_prot_numa+0x13/0x24               
> [  404.281495]  [<ffffffff8106abf0>] ? task_numa_work+0x20c/0x2ac               
> [  404.281503]  [<ffffffff810615e7>] ? finish_task_switch+0x83/0xc5             
> [  404.281512]  [<ffffffff8105af10>] ? task_work_run+0x7b/0x8f                  
> [  404.281521]  [<ffffffff8100d732>] ? do_notify_resume+0x5a/0x6d               
> [  404.281529]  [<ffffffff817bf49f>] ? retint_signal+0x48/0x89                  
> [  404.281537]  [<ffffffff810012eb>] ? xen_hypercall_iret+0xb/0x20
> 
> Decoding page flags 0x366 we have _PAGE_SPECIAL(_PAGE_NUMA) and
> _PAGE_GLOBAL(_PAGE_PROTNONE) set, _PAGE_PRESENT not set. It's handling
> a NUMA hint page fault and crashes because the PTE in question is
> considered a special PTE by pte_special.
> 
> In a Xen PV guest, _PAGE_GLOBAL is added by hypervisor to mark the page
> a guest user space page. Xen PV kernel has already forbidden setting
> that bit during initialisation. It's a bit unfortunate that there's
> still clash with _PAGE_PROTNONE.

_PAGE_IOMAP is no more (f955371 "x86: remove the Xen-specific
_PAGE_IOMAP PTE flag) so there's now a spare _PAGE_SOFTW2 that could be
used for NUMA hinting, instead of this confusing/complex aliasing.

David

  reply	other threads:[~2014-11-05 16:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-05 16:41 Pte_special broken on Xen PV when NUMA balancing is enabled Wei Liu
2014-11-05 16:57 ` David Vrabel [this message]
2014-11-05 16:57 ` David Vrabel
  -- strict thread matches above, loose matches on Subject: below --
2014-11-05 16:41 Wei Liu

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=545A5700.20902@citrix.com \
    --to=david.vrabel@citrix.com \
    --cc=akpm@linux-foundation.org \
    --cc=boris.ostrovsky@oracle.com \
    --cc=hughd@google.com \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /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.