From: Ian Campbell <Ian.Campbell@citrix.com>
To: Wei Liu <wei.liu2@citrix.com>
Cc: Anthony Perard <anthony.perard@citrix.com>,
Chao Peng <chao.p.peng@linux.intel.com>,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
Ian Jackson <ian.jackson@eu.citrix.com>,
xen-devel@lists.xen.org
Subject: Re: [PATCH] libxl: avoid bringing up vcpus already online
Date: Mon, 17 Nov 2014 10:29:19 +0000 [thread overview]
Message-ID: <1416220159.27385.20.camel@citrix.com> (raw)
In-Reply-To: <20141117094117.GF11070@zion.uk.xensource.com>
On Mon, 2014-11-17 at 09:41 +0000, Wei Liu wrote:
> On Mon, Nov 17, 2014 at 05:28:58PM +0800, Chao Peng wrote:
> > Avoid sending duplicated qmp commands and eliminate the confusing error
> > messages like "Unable to add CPU: 0, it already exists".
> >
> > Signed-off-by: Chao Peng <chao.p.peng@linux.intel.com>
> > ---
> > tools/libxl/libxl.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
> > index f7961f6..d040e5c 100644
> > --- a/tools/libxl/libxl.c
> > +++ b/tools/libxl/libxl.c
> > @@ -5450,7 +5450,7 @@ static int libxl__set_vcpuonline_qmp(libxl__gc *gc, uint32_t domid,
> > LOGE(ERROR, "getting domain info list");
> > return ERROR_FAIL;
> > }
> > - for (i = 0; i <= info.vcpu_max_id; i++) {
> > + for (i = info.vcpu_online; i <= info.vcpu_max_id; i++) {
>
> I don't think this is right. You're making an assumption that vcpu 0 to
> vcpu "info.vcpu_online" are online, which might not be true in hotplug /
> hot-unplug scenario.
Indeed. Adding Anthony for his input.
>
> Wei.
>
> > if (libxl_bitmap_test(cpumap, i)) {
> > /* Return value is ignore because it does not tell anything useful
> > * on the completion of the command.
> > --
> > 1.7.9.5
next prev parent reply other threads:[~2014-11-17 10:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-17 9:28 [PATCH] libxl: avoid bringing up vcpus already online Chao Peng
2014-11-17 9:41 ` Wei Liu
2014-11-17 10:29 ` Ian Campbell [this message]
2014-11-21 15:18 ` Anthony PERARD
2014-11-18 9:04 ` Chao Peng
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=1416220159.27385.20.camel@citrix.com \
--to=ian.campbell@citrix.com \
--cc=anthony.perard@citrix.com \
--cc=chao.p.peng@linux.intel.com \
--cc=ian.jackson@eu.citrix.com \
--cc=stefano.stabellini@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.