lkml.org 
[lkml]   [2013]   [Nov]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH RESEND v2 2/2] xen: enable vnuma for PV guest
On Tue, Nov 19, 2013 at 11:54:08AM +0000, David Vrabel wrote:
> On 18/11/13 21:58, Elena Ufimtseva wrote:
> > Enables numa if vnuma topology hypercall is supported and it is domU.
> [...]
> > --- a/arch/x86/xen/setup.c
> > +++ b/arch/x86/xen/setup.c
> > @@ -20,6 +20,7 @@
> > #include <asm/numa.h>
> > #include <asm/xen/hypervisor.h>
> > #include <asm/xen/hypercall.h>
> > +#include <asm/xen/vnuma.h>
> >
> > #include <xen/xen.h>
> > #include <xen/page.h>
> > @@ -598,6 +599,9 @@ void __init xen_arch_setup(void)
> > WARN_ON(xen_set_default_idle());
> > fiddle_vdso();
> > #ifdef CONFIG_NUMA
> > - numa_off = 1;
> > + if (!xen_initial_domain() && xen_vnuma_supported())
> > + numa_off = 0;
> > + else
> > + numa_off = 1;
> > #endif
> > }
>
> I think this whole #ifdef CONFIG_NUMA can be removed and hence
> xen_vnuma_supported() can be removed as well.
>
> For any PV guest we can call the xen_numa_init() and it will do the
> right thing.
>
> For dom0, the hypercall will either: return something sensible (if in
> the future Xen sets something up), or it will error.
>
> If Xen does not have vnuma support, the hypercall will error.
>
> In both error cases, the dummy numa node is setup as required.

Incorrect. It will end up calling:

if (!numa_init(amd_numa_init))

which will crash dom0 (see 8d54db795 "xen/boot: Disable NUMA for PV guests.")
as that amd_numa_init is called before the dummy node init.

>
> If you do this, you can fold this change in with the previous patch.
>
> David

\
 
 \ /
  Last update: 2013-11-19 16:01    [W:0.098 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site