From: Ian Campbell <ian.campbell@citrix.com>
To: Wei Liu <wei.liu2@citrix.com>
Cc: Xen-devel <xen-devel@lists.xenproject.org>,
Dario Faggioli <dario.faggioli@citrix.com>,
Ian Jackson <Ian.Jackson@eu.citrix.com>,
Boris Ostrovsky <boris.ostrovsky@oracle.com>
Subject: Re: [PATCH for-4.6 2/3] xl: fix vNUMA vcpus parsing
Date: Thu, 13 Aug 2015 11:07:47 +0100 [thread overview]
Message-ID: <1439460467.23981.53.camel@citrix.com> (raw)
In-Reply-To: <20150813095405.GQ7460@zion.uk.xensource.com>
On Thu, 2015-08-13 at 10:54 +0100, Wei Liu wrote:
> On Thu, Aug 13, 2015 at 10:42:26AM +0100, Ian Campbell wrote:
> > On Wed, 2015-08-12 at 20:36 +0100, Wei Liu wrote:
> > > Originally, if user didn't specify maxvcpus= in xl config file, the
> > > maximum size of vcpu bitmap was always equal to maximum number of
> > > pcpus.
> > > This might not be what user wants.
> >
> > What are you suggesting they wanted instead? We are only talking about
> > the
> > bitmap right, and the typical/sensible config will have #vcpus <=
> > #pcpus,
> > so they will fit even if they "waste" some bits during parsing.
>
> #vcpus > #pcpus, bitmap is too small.
Right. Which is trivial to detect as we go through the parsing and raise an
appropriate error.
> > I'm almost inclined to suggest that if a user wants #vcpus > #pcpus
> > they
> > should have to specify maxvcpus and not rely on the vnuma parsing code
> > inferring this fact.
> >
>
> I don't think we should prevent people from shooting themselves in the
> foot.
If the cost of supporting that is this patch then I disagree. If you can
find a way to do it simply and cleanly then fine, maybe.
In fact I even disagree in general, we can and should provide warnings or
errors for things which we know are bad and which are most likely
unintentional, but provide overrides.
> > IOW maybe this code could just error out (or print a warning) if this
> > happens? + a doc update.
> >
>
> Xl doesn't complain when you set vcpus > pcpus. I don't think vNUMA
> should behave differently.
Not always true, e.g. from vcpuset:
if (max_vcpus > dominfo.vcpu_online && max_vcpus > host_cpu) {
fprintf(stderr, "You are overcommmitting! You have %d physical" \
" CPUs and want %d vCPUs! Aborting, use --ignore-host to" \
" continue\n", host_cpu, max_vcpus);
rc = 1;
}
Ian.
next prev parent reply other threads:[~2015-08-13 10:07 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-12 19:35 [PATCH for-4.6 0/3] More vNUMA fixes Wei Liu
2015-08-12 19:35 ` [PATCH for-4.6 1/3] xl: fix vNUMA vdistance parsing Wei Liu
2015-08-13 8:35 ` Dario Faggioli
2015-08-12 19:36 ` [PATCH for-4.6 2/3] xl: fix vNUMA vcpus parsing Wei Liu
2015-08-13 9:26 ` David Vrabel
2015-08-13 9:32 ` Dario Faggioli
2015-08-13 9:47 ` Wei Liu
2015-08-13 9:42 ` Ian Campbell
2015-08-13 9:54 ` Wei Liu
2015-08-13 10:07 ` Ian Campbell [this message]
2015-08-13 10:28 ` Wei Liu
2015-08-13 10:40 ` Ian Campbell
2015-08-12 19:36 ` [PATCH for-4.6 3/3] libxc: fix vNUMA memory allocation Wei Liu
2015-08-13 8:34 ` Dario Faggioli
2015-08-13 20:23 ` Boris Ostrovsky
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=1439460467.23981.53.camel@citrix.com \
--to=ian.campbell@citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=boris.ostrovsky@oracle.com \
--cc=dario.faggioli@citrix.com \
--cc=wei.liu2@citrix.com \
--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.