From: Dario Faggioli <dario.faggioli@citrix.com>
To: Harmandeep Kaur <write.harmandeep@gmail.com>,
xen-devel@lists.xenproject.org
Cc: wei.liu2@citrix.com, ian.campbell@citrix.com,
ian.jackson@eu.citrix.com, george.dunlap@citrix.com,
stefano.stabellini@eu.citrix.com
Subject: Re: [PATCH 2/3] xl: convert vcpu related return codes to EXIT_[SUCCESS|FAILURE]
Date: Fri, 23 Oct 2015 12:41:21 +0200 [thread overview]
Message-ID: <1445596881.5117.92.camel@citrix.com> (raw)
In-Reply-To: <1445586491-15093-2-git-send-email-write.harmandeep@gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 2497 bytes --]
On Fri, 2015-10-23 at 13:18 +0530, Harmandeep Kaur wrote:
> turning vcpu manipulation functions xl exit codes toward using the
> EXIT_[SUCCESS|FAILURE] macros, instead of instead of arbitrary
> numbers
> or libxl return codes.
>
So, this patch is, technically, mostly fine. The observations on the
subject made when reviewing patch 1 applies here too, of course.
Something on the selection of functions the functions. The title says
the patch will address "vcpu related functions". However, there are a
bunch of parse_*() functions in the diff.
I appreciate that, for instance, parse_vcpu_affinity() can be
considered a vcpu related function, but that applies a lot less to
parse_vnuma_config(), IMO. I'd therefore exclude the latter from this
patch.
Alternatively, get rid of both and do another patch specifically for
dealing with parse_*() items. There are not many of them that are
actual exit paths and/or contain calls to exit() (parse_config_data()
is big enough, and a bit more complex, that it may well deserve its own
patch, and you can leave it alone, just mention that in the changelog).
A few more comments below.
> @@ -5461,7 +5461,7 @@ static int vcpuset(uint32_t domid, const char*
> nr_vcpus, int check_host)
>
> rc = libxl_domain_info(ctx, &dominfo, domid);
> if (rc)
> - return 1;
> + return EXIT_FAILURE;
>
if (libxl_domain_info(ctx, &dominfo, domid))
return EXIT_FAILURE;
> if (max_vcpus > dominfo.vcpu_online && max_vcpus > host_cpu)
> {
> fprintf(stderr, "You are overcommmitting! You have %d
> physical" \
> @@ -5471,12 +5471,12 @@ static int vcpuset(uint32_t domid, const
> char* nr_vcpus, int check_host)
> }
> libxl_dominfo_dispose(&dominfo);
> if (rc)
> - return 1;
> + return EXIT_FAILURE;
> }
> rc = libxl_cpu_bitmap_alloc(ctx, &cpumap, max_vcpus);
> if (rc) {
> fprintf(stderr, "libxl_cpu_bitmap_alloc failed, rc: %d\n",
> rc);
> - return 1;
> + return EXIT_FAILURE;
>
if (libxl_cpu_bitmap_alloc(ctx, &cpumap, max_vcpus))
return EXIT_FAILURE;
Thanks and Regards,
Dario
--
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2015-10-23 10:41 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-23 7:48 [PATCH 1/3] xl: convert scheduling related return codes to EXIT_[SUCCESS|FAILURE] Harmandeep Kaur
2015-10-23 7:48 ` [PATCH 2/3] xl: convert vcpu " Harmandeep Kaur
2015-10-23 10:41 ` Dario Faggioli [this message]
2015-10-23 7:48 ` [PATCH 3/3] xl: convert cpupool " Harmandeep Kaur
2015-10-23 12:10 ` Dario Faggioli
2015-10-23 12:33 ` Harmandeep Kaur
2015-10-23 8:30 ` [PATCH 1/3] xl: convert scheduling " Dario Faggioli
2015-10-23 9:56 ` Ian Campbell
2015-10-23 10:03 ` Dario Faggioli
2015-10-23 10:16 ` Ian Campbell
2015-10-23 10:16 ` 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=1445596881.5117.92.camel@citrix.com \
--to=dario.faggioli@citrix.com \
--cc=george.dunlap@citrix.com \
--cc=ian.campbell@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=wei.liu2@citrix.com \
--cc=write.harmandeep@gmail.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.