From: Dario Faggioli <raistlin@linux.it>
To: "Zhang, Yang Z" <yang.z.zhang@intel.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
Ian Campbell <Ian.Campbell@citrix.com>
Subject: Re: [PATCH v3 ]libxl: allow to set more than 31 vcpus
Date: Fri, 01 Jun 2012 08:35:41 +0200 [thread overview]
Message-ID: <1338532541.31901.10.camel@Abyss> (raw)
In-Reply-To: <A9667DDFB95DB7438FA9D7D576C3D87E162576@SHSMSX101.ccr.corp.intel.com>
[-- Attachment #1.1: Type: text/plain, Size: 1791 bytes --]
On Fri, 2012-06-01 at 02:48 +0000, Zhang, Yang Z wrote:
> Change from v2:
> Add function libxl_cpumap_to_hex_string to covert cpumap to hex string.
> According to Ian's comments, modified some codes to make the logic more reasonable.
>
> In current implementation, it uses integer to record current avail cpus and this only allows user to specify 31 vcpus.
> In following patch, it uses cpumap instead integer which make more sense than before. Also there is no limit to the max vcpus.
>
This part I understand, and looks reasonable.
I also see this is the whole point of your other patch, however ...
> diff -r 3b0eed731020 tools/libxl/xl_cmdimpl.c
> --- a/tools/libxl/xl_cmdimpl.c Fri Jun 01 09:27:17 2012 +0800
> +++ b/tools/libxl/xl_cmdimpl.c Fri Jun 01 10:34:13 2012 +0800
> @@ -650,7 +650,14 @@ static void parse_config_data(const char
>
> if (!xlu_cfg_get_long (config, "vcpus", &l, 0)) {
> b_info->max_vcpus = l;
> - b_info->cur_vcpus = (1 << l) - 1;
> +
> + if (libxl_cpumap_alloc(ctx, &b_info->avail_vcpus, l)) {
> + fprintf(stderr, "Unable to allocate cpumap\n");
> + exit(1);
> + }
>
... Do you mind explaining me what would have happened here without your
previous patch, i.e., by just using the existing libxl_cpumap_alloc ?
I might be wrong, but I was wondering whether it is worth changing the
interface like that for just this single case which saves, what, 1 to 3
bytes per domain?
Regards,
Dario
--
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://retis.sssup.it/people/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: 198 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:[~2012-06-01 6:35 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-01 2:48 [PATCH v3 ]libxl: allow to set more than 31 vcpus Zhang, Yang Z
2012-06-01 6:35 ` Dario Faggioli [this message]
2012-06-01 7:18 ` Zhang, Yang Z
2012-06-01 8:44 ` Dario Faggioli
2012-06-01 8:58 ` Ian Campbell
2012-06-01 9:32 ` Dario Faggioli
2012-06-01 9:41 ` Ian Campbell
2012-06-01 10:23 ` Dario Faggioli
2012-06-01 10:38 ` Ian Campbell
2012-06-01 10:47 ` Dario Faggioli
2012-06-01 10:50 ` Ian Campbell
2012-06-01 11:04 ` Dario Faggioli
2012-06-01 11:09 ` Ian Campbell
2012-06-01 11:44 ` Ian Campbell
2012-06-22 12:11 ` Ian Campbell
2012-06-24 23:35 ` Zhang, Yang Z
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=1338532541.31901.10.camel@Abyss \
--to=raistlin@linux.it \
--cc=Ian.Campbell@citrix.com \
--cc=xen-devel@lists.xensource.com \
--cc=yang.z.zhang@intel.com \
/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.