All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: Wei Liu <wei.liu2@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>, xen-devel@lists.xen.org
Subject: Re: [PATCH v7 21/21] xl: vNUMA support
Date: Wed, 11 Mar 2015 15:12:06 +0000	[thread overview]
Message-ID: <1426086726.21353.267.camel@citrix.com> (raw)
In-Reply-To: <1425905497-30835-22-git-send-email-wei.liu2@citrix.com>

On Mon, 2015-03-09 at 12:51 +0000, Wei Liu wrote:

> +Each B<VNODE_CONFIG_OPTION> is a quoted key=value pair. Supported
> +B<VNODE_CONFIG_OPTION>s are:

Which of these are optional and which are mandatory? All mandatory?

> +    if (!xlu_cfg_get_long (config, "maxmem", &l, 0))
> +        max_memkb1 = l * 1024;

I think you should arrange that if the user has specified maxmem then it
has already been parsed and is available in b_info->max_memkb for use in
this function. Reparsing it just leaves scope to get out of sync.

In particular this doesn't handle the defaulting of maxmem to memory.

> +#define ABORT_IF_FAILED(str)                                            \
> +                do {                                                    \
> +                    if (endptr == value || val == ULONG_MAX) {          \

Looking at the uses, I think you mean str here where you have value, no?

Given that you exit() here I think you could write this as a helper
function which did the parsing for you too, i.e. folds in the strtoul.

> +    if (total_cpus != b_info->max_vcpus) {
> +        fprintf(stderr, "xl: vnuma vcpus and maxvcpus= mismatch\n");
> +        exit(1);
> +    }

Can't we do as we do with memory here and set max_vcpus if it isn't
already configured?

  reply	other threads:[~2015-03-11 15:12 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-09 12:51 [PATCH v7 00/21] Virtual NUMA for PV and HVM Wei Liu
2015-03-09 12:51 ` [PATCH v7 01/21] xen: make two memory hypercalls vNUMA-aware Wei Liu
2015-03-09 13:22   ` Jan Beulich
2015-03-09 13:29     ` Wei Liu
2015-03-09 13:52       ` Jan Beulich
2015-03-09 13:59         ` Wei Liu
2015-03-09 12:51 ` [PATCH v7 02/21] libxc: duplicate snippet to allocate p2m_host array Wei Liu
2015-03-09 15:06   ` Konrad Rzeszutek Wilk
2015-03-11 15:02   ` Ian Campbell
2015-03-09 12:51 ` [PATCH v7 03/21] libxc: add p2m_size to xc_dom_image Wei Liu
2015-03-09 12:51 ` [PATCH v7 04/21] libxc: allocate memory with vNUMA information for PV guest Wei Liu
2015-03-09 12:51 ` [PATCH v7 05/21] libxl: introduce vNUMA types Wei Liu
2015-03-09 12:51 ` [PATCH v7 06/21] libxl: add vmemrange to libxl__domain_build_state Wei Liu
2015-03-09 12:51 ` [PATCH v7 07/21] libxl: introduce libxl__vnuma_config_check Wei Liu
2015-03-09 12:51 ` [PATCH v7 08/21] libxl: x86: factor out e820_host_sanitize Wei Liu
2015-03-09 12:51 ` [PATCH v7 09/21] libxl: functions to build vmemranges for PV guest Wei Liu
2015-03-09 12:51 ` [PATCH v7 10/21] libxl: build, check and pass vNUMA info to Xen " Wei Liu
2015-03-09 12:51 ` [PATCH v7 11/21] libxc: indentation change to xc_hvm_build_x86.c Wei Liu
2015-03-09 12:51 ` [PATCH v7 12/21] libxc: allocate memory with vNUMA information for HVM guest Wei Liu
2015-03-09 12:51 ` [PATCH v7 13/21] libxl: build, check and pass vNUMA info to Xen " Wei Liu
2015-03-09 12:51 ` [PATCH v7 14/21] libxl: disallow memory relocation when vNUMA is enabled Wei Liu
2015-03-09 12:51 ` [PATCH v7 15/21] libxl: define LIBXL_HAVE_VNUMA Wei Liu
2015-03-11 15:03   ` Ian Campbell
2015-03-09 12:51 ` [PATCH v7 16/21] libxlu: rework internal representation of setting Wei Liu
2015-03-09 12:51 ` [PATCH v7 17/21] libxlu: nested list support Wei Liu
2015-03-09 12:51 ` [PATCH v7 18/21] libxlu: record location when parsing values Wei Liu
2015-03-11 15:12   ` Ian Campbell
2015-03-11 15:16     ` Wei Liu
2015-03-11 15:36       ` Ian Campbell
2015-03-09 12:51 ` [PATCH v7 19/21] libxlu: introduce new APIs Wei Liu
2015-03-09 12:51 ` [PATCH v7 20/21] xl: introduce xcalloc Wei Liu
2015-03-09 12:51 ` [PATCH v7 21/21] xl: vNUMA support Wei Liu
2015-03-11 15:12   ` Ian Campbell [this message]
2015-03-11 20:14     ` Wei Liu
2015-03-12 10:00       ` Ian Campbell
2015-03-12 10:50         ` Wei Liu
2015-03-12 10:58           ` Ian Campbell
2015-03-12 13:22       ` Dario Faggioli
2015-03-12 13:37         ` 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=1426086726.21353.267.camel@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --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.