All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Vrabel <david.vrabel@citrix.com>
To: Elena Ufimtseva <ufimtseva@gmail.com>
Cc: akpm@linux-foundation.org, wency@cn.fujitsu.com, x86@kernel.org,
	linux-kernel@vger.kernel.org, tangchen@cn.fujitsu.com,
	mingo@redhat.com, hpa@zytor.com, xen-devel@lists.xenproject.org,
	boris.ostrovsky@oracle.com, tglx@linutronix.de,
	stefano.stabellini@eu.citrix.com, ian.campbell@citrix.com
Subject: Re: [PATCH RESEND v2 2/2] xen: enable vnuma for PV guest
Date: Tue, 19 Nov 2013 11:54:08 +0000	[thread overview]
Message-ID: <528B5160.5010902__34635.1875029088$1384862161$gmane$org@citrix.com> (raw)
In-Reply-To: <1384811922-14642-3-git-send-email-ufimtseva@gmail.com>

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.

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

David

  parent reply	other threads:[~2013-11-19 11:54 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-18 21:58 [PATCH RESEND v2 0/2] xen: vnuma introduction for pv guest Elena Ufimtseva
2013-11-18 21:58 ` [PATCH RESEND v2 1/2] xen: vnuma support for PV guests running as domU Elena Ufimtseva
2013-11-18 21:58 ` Elena Ufimtseva
2013-11-19 11:53   ` David Vrabel
2013-11-19 11:53   ` David Vrabel
2013-11-18 21:58 ` [PATCH RESEND v2 2/2] xen: enable vnuma for PV guest Elena Ufimtseva
2013-11-18 21:58 ` Elena Ufimtseva
2013-11-19 11:54   ` David Vrabel
2013-11-19 14:16     ` Konrad Rzeszutek Wilk
2013-11-19 14:16     ` Konrad Rzeszutek Wilk
2013-11-19 14:35       ` David Vrabel
2013-11-19 14:46         ` Konrad Rzeszutek Wilk
2013-11-19 14:46         ` Konrad Rzeszutek Wilk
2013-11-19 14:56           ` David Vrabel
2013-11-19 14:56           ` David Vrabel
2013-11-19 15:19             ` Konrad Rzeszutek Wilk
2013-11-19 15:55               ` David Vrabel
2013-11-19 16:20                 ` Konrad Rzeszutek Wilk
2013-11-19 16:20                 ` Konrad Rzeszutek Wilk
2013-11-19 15:55               ` David Vrabel
2013-11-19 15:19             ` Konrad Rzeszutek Wilk
2013-11-23 16:48             ` Dario Faggioli
2013-11-23 16:48             ` [Xen-devel] " Dario Faggioli
2013-11-19 14:35       ` David Vrabel
2013-11-19 11:54   ` David Vrabel [this message]
2013-11-19  7:18 ` [Xen-devel] [PATCH RESEND v2 0/2] xen: vnuma introduction for pv guest Dario Faggioli
2013-11-19  7:18 ` Dario Faggioli

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='528B5160.5010902__34635.1875029088$1384862161$gmane$org@citrix.com' \
    --to=david.vrabel@citrix.com \
    --cc=akpm@linux-foundation.org \
    --cc=boris.ostrovsky@oracle.com \
    --cc=hpa@zytor.com \
    --cc=ian.campbell@citrix.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=tangchen@cn.fujitsu.com \
    --cc=tglx@linutronix.de \
    --cc=ufimtseva@gmail.com \
    --cc=wency@cn.fujitsu.com \
    --cc=x86@kernel.org \
    --cc=xen-devel@lists.xenproject.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.