All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Jackson <Ian.Jackson@eu.citrix.com>
To: Dario Faggioli <raistlin@linux.it>
Cc: Andre Przywara <andre.przywara@amd.com>,
	Ian Campbell <Ian.Campbell@citrix.com>,
	Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>,
	George Dunlap <George.Dunlap@eu.citrix.com>,
	Juergen Gross <juergen.gross@ts.fujitsu.com>,
	xen-devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH 2 of 4 v6/leftover] xl: inform libxl if there was a cpumap in the config file
Date: Mon, 23 Jul 2012 12:04:29 +0100	[thread overview]
Message-ID: <20493.12221.272930.55159@mariner.uk.xensource.com> (raw)
In-Reply-To: <ce02c3daeb7d7d8e8d26.1342833742@Solace>

Dario Faggioli writes ("[PATCH 2 of 4 v6/leftover] xl: inform libxl if there was a cpumap in the config file"):
> So that we attempt automatic placement only if that was not the case.
> 
> Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
> 
> diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c
> --- a/tools/libxl/libxl_create.c
> +++ b/tools/libxl/libxl_create.c
> @@ -215,6 +215,8 @@ int libxl__domain_build_info_setdefault(
>          libxl_bitmap_set_any(&b_info->cpumap);
>      }
>  
> +    libxl_defbool_setdefault(&b_info->numa_placement, true);
> +
>      if (b_info->max_memkb == LIBXL_MEMKB_DEFAULT)
>          b_info->max_memkb = 32 * 1024;
>      if (b_info->target_memkb == LIBXL_MEMKB_DEFAULT)
> diff --git a/tools/libxl/libxl_dom.c b/tools/libxl/libxl_dom.c
> --- a/tools/libxl/libxl_dom.c
> +++ b/tools/libxl/libxl_dom.c
> @@ -212,7 +212,8 @@ int libxl__build_pre(libxl__gc *gc, uint
>       * call to libxl_set_vcpuaffinity_all() will do the actual placement,
>       * whatever that turns out to be.
>       */
> -    if (libxl_bitmap_is_full(&info->cpumap)) {
> +    if (libxl_defbool_val(info->numa_placement) &&
> +        libxl_bitmap_is_full(&info->cpumap)) {
>          int rc = numa_place_domain(gc, info);

Shouldn't this be

  -    if (libxl_bitmap_is_full(&info->cpumap)) {
  +    if (libxl_defbool_val(info->numa_placement)) {
  +        if (!libxl_bitmap_is_full(&info->cpumap)) {
  +            rc = ERROR_INVAL;
  +            LOG blah blah invalid not supported
  +            goto out;
  +        }

or the equivalent ?

Apart from that it looks good to me.

Ian.

  reply	other threads:[~2012-07-23 11:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-21  1:22 [PATCH 0 of 4 v6/leftover] Automatic NUMA placement for xl Dario Faggioli
2012-07-21  1:22 ` [PATCH 1 of 4 v6/leftover] libxl: enable automatic placement of guests on NUMA nodes Dario Faggioli
2012-07-23 11:38   ` Ian Jackson
2012-07-23 14:39     ` Dario Faggioli
2012-07-23 15:50       ` Ian Jackson
2012-07-23 16:16         ` Dario Faggioli
2012-07-21  1:22 ` [PATCH 2 of 4 v6/leftover] xl: inform libxl if there was a cpumap in the config file Dario Faggioli
2012-07-23 11:04   ` Ian Jackson [this message]
2012-07-23 13:35     ` Dario Faggioli
2012-07-21  1:22 ` [PATCH 3 of 4 v6/leftover] libxl: have NUMA placement deal with cpupools Dario Faggioli
2012-07-23 11:38   ` Ian Jackson
2012-07-23 13:21     ` Dario Faggioli
2012-07-21  1:22 ` [PATCH 4 of 4 v6/leftover] Some automatic NUMA placement documentation 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=20493.12221.272930.55159@mariner.uk.xensource.com \
    --to=ian.jackson@eu.citrix.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=Stefano.Stabellini@eu.citrix.com \
    --cc=andre.przywara@amd.com \
    --cc=juergen.gross@ts.fujitsu.com \
    --cc=raistlin@linux.it \
    --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.