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: Thu, 12 Mar 2015 10:00:24 +0000	[thread overview]
Message-ID: <1426154424.21353.348.camel@citrix.com> (raw)
In-Reply-To: <20150311201452.GA16468@zion.uk.xensource.com>

On Wed, 2015-03-11 at 20:14 +0000, Wei Liu wrote:
> On Wed, Mar 11, 2015 at 03:12:06PM +0000, Ian Campbell wrote:
> > 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?
> > 
> 
> Yes, all mandatory for now.

Please can you say so.
> 
> > > +    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.
> > 
> 
> This is exactly the reason I do this here.  At this point
> b_info->max_memkb is always set.
> 
> If user has specified maxmem we should check if the configuration he /
> she specifies matches the vnuma value to avoid misconfiguration;
> otherwise we just use vnuma memory as maxmem.
> 
> But see below regarding maxvcpus=.
[...]
> > > +    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?
> > 
> 
> This can be done.  It will require moving parse_vnuma_config to
> beginning of parse_config_data and stubbing out parsing of maxvcpus
> and maxmem if vnuma configuration presents.

I'm afraid I don't follow.

I was thinking the flow would be:

	Call libxl_foo_init to set everything to the default.

        f ( max_mem in cfg )
                cfg->maxmem = v
        if ( memory in cfg )
                cfg->memory = v
        if ( vcpus in cfg )
                cfg->vcpus = v
                
        do numa parsing, using fact that cfg->{maxmem,memory,vcpus} are
        either default value (in which case they are set here) or
        explicitly set to some value, in which case they are sanity
        checked.

        handle maxmem/memory/vcpus/etc still being default values by
        setting the appropriate defaults.

Ian.

  reply	other threads:[~2015-03-12 10:00 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
2015-03-11 20:14     ` Wei Liu
2015-03-12 10:00       ` Ian Campbell [this message]
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=1426154424.21353.348.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.