Skip to contentSkip to conversation

xl: allow for node-wise specification of vcpu pinning

PATCH In review Dario Faggioli 4 participants 22 messages Sep 6, 2013 – Sep 16, 2013

lore
Share & tools
lore
#0 lore raw

v2 cover xl: allow for node-wise specification of vcpu pinning

Hi all,

This is the second take of a patch that I submitted some time ago for allowing specifying vcpu pinning taking NUMA nodes into account. IOW, something like this:
* "nodes:0-3": all pCPUs of nodes 0,1,2,3;
 * "nodes:0-3,^node:2": all pCPUS of nodes 0,1,3;
 * "1,nodes:1-2,^6": pCPU 1 plus all pCPUs of nodes 1,2
   but not pCPU 6;

v1 was a single patch, this is a small series. It become necessary to do that while coping with the review comments I got from IanJ. While at it, I am also sending a small fix to the xl manpage, which is not related to the series, but is still about vcpu pinning (something that I forgot to change when working on NUMA-aware scheduling), as the first patch in the series itself.

I really believe I addressed all of Ian's comments, although, no, I haven't converted the parsing to flex (which was not an hard requirement, AFAIUI), because I don't think it is worthwhile in this case.

Let me know what you think about it.

Thanks and Regards,
Dario

---
Dario Faggioli (5):
xl: update the manpage about "cpus=" and NUMA node-affinity
libxl: introduce libxl_node_to_cpumap
xl: allow for node-wise specification of vcpu pinning
xl: implement and enable dryrun mode for `xl vcpu-pin'
xl: test script for the cpumap parser (for vCPU pinning)

 docs/man/xl.cfg.pod.5              |   42 +++++--
 tools/libxl/check-xl-vcpupin-parse |  229 ++++++++++++++++++++++++++++++++++++
 tools/libxl/libxl_utils.c          |   22 +++
 tools/libxl/libxl_utils.h          |    3 
 tools/libxl/xl_cmdimpl.c           |  198 ++++++++++++++++++++++---------
 tools/libxl/xl_cmdtable.c          |    2 
 6 files changed, 432 insertions(+), 64 deletions(-)
 create mode 100755 tools/libxl/check-xl-vcpupin-parse

--
<<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)

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#1 lore raw

PATCH v2 1/5 xl: update the manpage about "cpus=" and NUMA node-affinity

Since d06b1bf169a01a9c7b0947d7825e58cb455a0ba5 ('libxl: automatic placement deals with node-affinity') it is no longer true that, if no "cpus=" option is specified, xl picks up some pCPUs by default and pin the domain there.

In fact, it is the NUMA node-affinity that is affected by automatic placement, not vCPU to pCPU pinning.

Update the xl config file documenation accordingly, as it seems to have been forgotten at that time.

---
 docs/man/xl.cfg.pod.5 |   22 +++++++++++++++-------
 1 file changed, 15 insertions(+), 7 deletions(-)
docs/man/xl.cfg.pod.5 +15 -7
index 08d6cc4..00b0aa0 100644
@@ -104,8 +104,8 @@ created online and the remainder will be offline.
 
 =item B<cpus="CPU-LIST">
 
-List of which cpus the guest is allowed to use. By default xl will pick
-some cpus on its own (see below). A C<CPU-LIST> may be specified as follows:
+List of which cpus the guest is allowed to use. Default is no pinning at
+all (more on this below). A C<CPU-LIST> may be specified as follows:
 
 =over 4
 
@@ -125,11 +125,19 @@ run on cpu #3 of the host.
 
 =back
 
-If this option is not specified, libxl automatically tries to place the new
-domain on the host's NUMA nodes (provided the host has more than one NUMA
-node) by pinning it to the cpus of those nodes. A heuristic approach is
-utilized with the goals of maximizing performance for the domain and, at
-the same time, achieving efficient utilization of the host's CPUs and RAM.
+If this option is not specified, no vcpu to cpu pinning is established,
+and the vcpus of the guest can run on all the cpus of the host.
+
+If we are on a NUMA machine (i.e., if the host has more than one NUMA
+node) and this option is not specified, libxl automatically tries to
+place the guest on the least possible number of nodes. That, however,
+will not affect vcpu pinning, so the guest will still be able to run on
+all the cpus, it will just prefer the ones from the node it has been
+placed on. A heuristic approach is used for choosing the best node (or
+set of nodes), with the goals of maximizing performance for the guest
+and, at the same time, achieving efficient utilization of host cpus
+and memory. See F<docs/misc/xl-numa-placement.markdown> for more
+details.
 
 =back
Acked-by on v2 1/5
#2 lore raw

Re: [PATCH v2 1/5] xl: update the manpage about "cpus=" and NUMA node-affinity

Dario Faggioli writes ("[PATCH v2 1/5] xl: update the manpage about "cpus=" and NUMA node-affinity"):

Quoted 9 lines

Since d06b1bf169a01a9c7b0947d7825e58cb455a0ba5 ('libxl: automatic placement deals with node-affinity') it is no longer true that, if no "cpus=" option is specified, xl picks up some pCPUs by default and pin the domain there.

In fact, it is the NUMA node-affinity that is affected by automatic placement, not vCPU to pCPU pinning.

Update the xl config file documenation accordingly, as it seems to have been forgotten at that time.

I haven't reviewed this for correctness but as a docs patch I'm happy for it just to go in.

#3 lore raw

PATCH v2 2/5 libxl: introduce libxl_node_to_cpumap

In reply to Dario Faggioli

As an helper for the special case (of libxl_nodemap_to_cpumap) when one wants the cpumap for just one node.

---
 tools/libxl/libxl_utils.c |   22 ++++++++++++++++++++++
 tools/libxl/libxl_utils.h |    3 +++
 2 files changed, 25 insertions(+)
tools/libxl/libxl_utils.c +22 -0
index 4309e5e..5c125e6 100644
@@ -668,6 +668,28 @@ int libxl_nodemap_to_cpumap(libxl_ctx *ctx,
     return rc;
 }
 
+int libxl_node_to_cpumap(libxl_ctx *ctx, int node,
+                         libxl_bitmap *cpumap)
+{
+    libxl_bitmap nodemap;
+    int rc = 0;
+
+    libxl_bitmap_init(&nodemap);
+
+    rc = libxl_node_bitmap_alloc(ctx, &nodemap, 0);
+    if (rc)
+        goto out;
+
+    libxl_bitmap_set_none(&nodemap);
+    libxl_bitmap_set(&nodemap, node);
+
+    rc = libxl_nodemap_to_cpumap(ctx, &nodemap, cpumap);
+
+ out:
+    libxl_bitmap_dispose(&nodemap);
+    return rc;
+}
+
 int libxl_cpumap_to_nodemap(libxl_ctx *ctx,
                             const libxl_bitmap *cpumap,
                             libxl_bitmap *nodemap)
tools/libxl/libxl_utils.h +3 -0
index a430362..7b84e6a 100644
@@ -129,6 +129,9 @@ static inline int libxl_node_bitmap_alloc(libxl_ctx *ctx,
 int libxl_nodemap_to_cpumap(libxl_ctx *ctx,
                             const libxl_bitmap *nodemap,
                             libxl_bitmap *cpumap);
+/* Populate cpumap with the cpus spanned by node */
+int libxl_node_to_cpumap(libxl_ctx *ctx, int node,
+                         libxl_bitmap *cpumap);
 /* Populate nodemap with the nodes of the cpus in cpumap */
 int libxl_cpumap_to_nodemap(libxl_ctx *ctx,
                             const libxl_bitmap *cpuemap,
Acked-by on v2 2/5
#4 lore raw

Re: [PATCH v2 2/5] libxl: introduce libxl_node_to_cpumap

Dario Faggioli writes ("[PATCH v2 2/5] libxl: introduce libxl_node_to_cpumap"):

Quoted 2 lines

As an helper for the special case (of libxl_nodemap_to_cpumap) when one wants the cpumap for just one node.

#5 lore raw

PATCH v2 3/5 xl: allow for node-wise specification of vcpu pinning

In reply to Dario Faggioli

Making it possible to use something like the following:
* "nodes:0-3": all pCPUs of nodes 0,1,2,3;
* "nodes:0-3,^node:2": all pCPUS of nodes 0,1,3;
* "1,nodes:1-2,^6": pCPU 1 plus all pCPUs of nodes 1,2 but not pCPU 6;
* ...

In both domain config file and `xl vcpu-pin'.

---
Changes from v1:
* code rearranged in order to look more simple to follow and understand, as requested during review;
* improved docs in xl.cfg.pod.5, as requested during review;
* strtoul() now returns into unsigned long, and the case where it returns ULONG_MAX is now taken into account, as requested during review;
* stuff like "all,^7" now works, as requested during review. Specifying just "^7" does not work either before or after this change
* killed some magic (i.e., ptr += 5 + (ptr[4] == 's') by introducing STR_SKIP_PREFIX() macro, as requested during review.

---
 docs/man/xl.cfg.pod.5    |   20 ++++++
 tools/libxl/xl_cmdimpl.c |  152 +++++++++++++++++++++++++++++++++-------------
 2 files changed, 127 insertions(+), 45 deletions(-)
docs/man/xl.cfg.pod.5 +19 -1
index 00b0aa0..6c51556 100644
@@ -115,7 +115,25 @@ To allow all the vcpus of the guest to run on all the cpus on the host.
 
 =item "0-3,5,^1"
 
-To allow all the vcpus of the guest to run on cpus 0,2,3,5.
+To allow all the vcpus of the guest to run on cpus 0,2,3,5. Combining
+this with "all" is possible, meaning "all,^7" results in all the vcpus
+of the guest running on all the cpus on the host except cpu 7.
+
+=item "nodes:0-3,node:^2"
+
+To allow all the vcpus of the guest to run on the cpus from NUMA nodes
+0,1,3 of the host. So, if cpus 0-3 belongs to node 0, cpus 4-7 belongs
+to node 1 and cpus 8-11 to node 3, the above would mean all the vcpus
+of the guest will run on cpus 0-3,8-11.
+
+Combining this notation with the one above is possible. For instance,
+"1,node:2,^6", means all the vcpus of the guest will run on cpu 1 and
+on all the cpus of NUMA node 2, but not on cpu 6. Following the same
+example as above, that would be cpus 1,4,5,7.
+
+Combining this with "all" is also possible, meaning "all,^nodes:1"
+results in all the vcpus of the guest running on all the cpus on the
+host, except for the cpus belonging to the host NUMA node 1.
 
 =item ["2", "3"] (or [2, 3])
 
tools/libxl/xl_cmdimpl.c +108 -44

175 lines not on this page · raw message

#6 lore raw

Dario Faggioli writes ("[PATCH v2 3/5] xl: allow for node-wise specification of vcpu pinning"):

Quoted 6 lines

Making it possible to use something like the following:
* "nodes:0-3": all pCPUs of nodes 0,1,2,3;
* "nodes:0-3,^node:2": all pCPUS of nodes 0,1,3;
* "1,nodes:1-2,^6": pCPU 1 plus all pCPUs of nodes 1,2 but not pCPU 6;
* ...

...

Quoted 2 lines

* code rearranged in order to look more simple to follow and understand, as requested during review;

This is much better now. Thank you!

Quoted 2 lines

+static int parse_range(const char *str, unsigned long *a, unsigned long *b)
{

...

tools/libxl/xl_cmdimpl.c static void split_string_into_string_list(const char *str, · line 497

Quoted 4 lines
tools/libxl/xl_cmdimpl.c +4 -0
+    if (endptr == str)
+        return EINVAL;
+    if (*a == ULONG_MAX)
+        return ERANGE;

So parse_range returns errno value or 0. This isn't mentioned anywhere and is a bit unusual.

Quoted 2 lines
tools/libxl/xl_cmdimpl.c +2 -0
+static int update_cpumap_range(const char *str, libxl_bitmap *cpumap)
+{

...

tools/libxl/xl_cmdimpl.c static void split_string_into_string_list(const char *str, · line 528

Quoted 4 lines
tools/libxl/xl_cmdimpl.c +4 -0
+    rc = libxl_node_bitmap_alloc(ctx, &node_cpumap, 0);
+    if (rc) {
+        fprintf(stderr, "libxl_node_bitmap_alloc failed.\n");
+        return rc;

So update_cpumap_range returns a libxl error code.

Review

Quoted 2 lines
(quoted diff) +2 -0
+    rc = parse_range(str, &ida, &idb);
+    if (rc) {

But here you assign the errno value to an `rc' variable which holds a libxl error code. I think it would be better to make parse_range return a libxl rc value.

I think also that parse_range doesn't notice if the specified range contains junk between the second number and the comma ?

Quoted 2 lines
tools/libxl/xl_cmdimpl.c +2 -0
+static int vcpupin_parse(char *cpu, libxl_bitmap *cpumap)
+{

...

tools/libxl/xl_cmdimpl.c static void split_string_into_string_list(const char *str, · line 592

Quoted 3 lines
tools/libxl/xl_cmdimpl.c +3 -0
+        if (STR_HAS_PREFIX(ptr, "all") ||
+            STR_HAS_PREFIX(ptr, "nodes:all")) {
+            libxl_bitmap_set_any(cpumap);

Why not deal with all in parse_range ? You'd avoid the second special-case of "nodes:", and constructions like
all,^3
would work.

tools/libxl/xl_cmdimpl.c static void split_string_into_string_list(const char *str, · line 599

Quoted 6 lines
tools/libxl/xl_cmdimpl.c +4 -2
-vcpp_out:
-    libxl_bitmap_dispose(&exclude_cpumap);
+        rc = update_cpumap_range(ptr, cpumap);
+        if (rc) {
+            /* If failing, reset the cpumap and exit */
+            libxl_bitmap_set_none(cpumap);

Surely the caller who gets a error should expect the cpumap to contain arbitrary contents ?

Thanks,
Ian.

#7 lore raw
Quoted 7 lines · Ian Jackson

Dario Faggioli writes ("[PATCH v2 3/5] xl: allow for node-wise specification of vcpu pinning"):

Quoted 6 lines

Making it possible to use something like the following:
* "nodes:0-3": all pCPUs of nodes 0,1,2,3;
* "nodes:0-3,^node:2": all pCPUS of nodes 0,1,3;
* "1,nodes:1-2,^6": pCPU 1 plus all pCPUs of nodes 1,2 but not pCPU 6;
* ...

Quoted 6 lines

...

Quoted 2 lines

* code rearranged in order to look more simple to follow and understand, as requested during review;

This is much better now. Thank you!

Glad to hear that. :-)

Quoted 19 lines
Quoted 2 lines

+static int parse_range(const char *str, unsigned long *a, unsigned long *b)
{

...

tools/libxl/xl_cmdimpl.c static void split_string_into_string_list(const char *str, · line 497

Quoted 4 lines
tools/libxl/xl_cmdimpl.c +4 -0
+    if (endptr == str)
+        return EINVAL;
+    if (*a == ULONG_MAX)
+        return ERANGE;

So parse_range returns errno value or 0. This isn't mentioned anywhere and is a bit unusual.

Quoted 2 lines
tools/libxl/xl_cmdimpl.c +2 -0
+static int update_cpumap_range(const char *str, libxl_bitmap *cpumap)
+{

...

tools/libxl/xl_cmdimpl.c static void split_string_into_string_list(const char *str, · line 528

Quoted 4 lines
tools/libxl/xl_cmdimpl.c +4 -0
+    rc = libxl_node_bitmap_alloc(ctx, &node_cpumap, 0);
+    if (rc) {
+        fprintf(stderr, "libxl_node_bitmap_alloc failed.\n");
+        return rc;
Quoted 9 lines

So update_cpumap_range returns a libxl error code.

Review

Quoted 2 lines
(quoted diff) +2 -0
+    rc = parse_range(str, &ida, &idb);
+    if (rc) {

But here you assign the errno value to an `rc' variable which holds a libxl error code. I think it would be better to make parse_range return a libxl rc value.

You're right, I cleaned up the code, but messed up quite a bit with the error codes!

Thanks for pointing this out, I will put thing in a more consistent state.

Quoted 3 lines

I think also that parse_range doesn't notice if the specified range contains junk between the second number and the comma ?

Mmm... I will double check, although I'm not sure I'm getting you 100%, since parse_range does not deal with comas... That are handled by "strtok_r(cpu, ",", &saveptr)", which now is in vcpupin_parse().

Quoted 12 lines
Quoted 2 lines
tools/libxl/xl_cmdimpl.c +2 -0
+static int vcpupin_parse(char *cpu, libxl_bitmap *cpumap)
+{

...

tools/libxl/xl_cmdimpl.c static void split_string_into_string_list(const char *str, · line 592

Quoted 3 lines
tools/libxl/xl_cmdimpl.c +3 -0
+        if (STR_HAS_PREFIX(ptr, "all") ||
+            STR_HAS_PREFIX(ptr, "nodes:all")) {
+            libxl_bitmap_set_any(cpumap);

Why not deal with all in parse_range ? You'd avoid the second special-case of "nodes:", and constructions like
all,^3
would work.

Having it here already makes that ("all,^3") work, but it is true that it'd simplify the if, and that it belongs more within parse_range() than here. I'll move it.

Quoted 10 lines

tools/libxl/xl_cmdimpl.c static void split_string_into_string_list(const char *str, · line 599

Quoted 6 lines
tools/libxl/xl_cmdimpl.c +4 -2
-vcpp_out:
-    libxl_bitmap_dispose(&exclude_cpumap);
+        rc = update_cpumap_range(ptr, cpumap);
+        if (rc) {
+            /* If failing, reset the cpumap and exit */
+            libxl_bitmap_set_none(cpumap);

Surely the caller who gets a error should expect the cpumap to contain arbitrary contents ?

Fair enough.

BTW, any chance you could have a look at 4/5 and 5/5 as well, so that I can repost?

Thanks and Regards,
Dario

Signature · 4 lines
<<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)

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#8 lore raw
In reply to Dario Faggioli

Dario Faggioli writes ("[PATCH v2 3/5] xl: allow for node-wise specification of vcpu pinning"):

Quoted 1 line

Making it possible to use something like the following:

...

Oh, and:

tools/libxl/xl_cmdimpl.c static void split_string_into_string_list(const char *str, · line 528

Quoted 13 lines
tools/libxl/xl_cmdimpl.c +13 -0
+static int update_cpumap_range(const char *str, libxl_bitmap *cpumap)
+{
+    unsigned long ida, idb;
+    libxl_bitmap node_cpumap;
+    bool is_not = false, is_nodes = false;
+    int rc = 0;
+
+    libxl_bitmap_init(&node_cpumap);
+
+    rc = libxl_node_bitmap_alloc(ctx, &node_cpumap, 0);
+    if (rc) {
+        fprintf(stderr, "libxl_node_bitmap_alloc failed.\n");
+        return rc;

This could be "goto out". I think that's clearer. It follows the "zero everything right at the top, and use `goto out' for every premature exit" pattern.

Thanks,
Ian.

#9 lore raw
Quoted 10 lines · Ian Jackson

Dario Faggioli writes ("[PATCH v2 3/5] xl: allow for node-wise specification of vcpu pinning"):

Quoted 9 lines
tools/libxl/xl_cmdimpl.c +9 -0
+static int update_cpumap_range(const char *str, libxl_bitmap *cpumap)
+{
+    unsigned long ida, idb;
+    libxl_bitmap node_cpumap;
+    bool is_not = false, is_nodes = false;
+    int rc = 0;
+
+    libxl_bitmap_init(&node_cpumap);
+
Quoted 9 lines

tools/libxl/xl_cmdimpl.c static void split_string_into_string_list(const char *str, · line 528

Quoted 4 lines
tools/libxl/xl_cmdimpl.c +4 -0
+    rc = libxl_node_bitmap_alloc(ctx, &node_cpumap, 0);
+    if (rc) {
+        fprintf(stderr, "libxl_node_bitmap_alloc failed.\n");
+        return rc;

This could be "goto out". I think that's clearer. It follows the "zero everything right at the top, and use `goto out' for every premature exit" pattern.

Agreed, will do.

Dario

Signature · 4 lines
<<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)

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#10 lore raw

PATCH v2 4/5 xl: implement and enable dryrun mode for `xl vcpu-pin'

In reply to Dario Faggioli

As it can be useful to see whetehr the outcome of some complex vCPU pinning bitmap specification looks as expected.

This also allow for the introduction of some automatic testing and verification for the bitmap parsing code, as it happens already in check-xl-disk-parse and check-xl-vif-parse.

In particular, to make the above possible, this commit also changes the implementation of the vcpu-pin command so that, instead of always returning 0, it returns an error if the parsing fails.

---
 tools/libxl/xl_cmdimpl.c  |   46 ++++++++++++++++++++++++++++++++++-----------
 tools/libxl/xl_cmdtable.c |    2 +-
 2 files changed, 36 insertions(+), 12 deletions(-)
tools/libxl/xl_cmdimpl.c +35 -11
index da6a6df..eb99231 100644
@@ -4534,30 +4534,54 @@ int main_vcpulist(int argc, char **argv)
     return 0;
 }
 
-static void vcpupin(uint32_t domid, const char *vcpu, char *cpu)
+static int vcpupin(uint32_t domid, const char *vcpu, char *cpu)
 {
     libxl_vcpuinfo *vcpuinfo;
     libxl_bitmap cpumap;
 
     uint32_t vcpuid;
     char *endptr;
-    int i, nb_vcpu;
+    int i, nb_vcpu, rc = -1;
+
+    libxl_bitmap_init(&cpumap);
 
     vcpuid = strtoul(vcpu, &endptr, 10);
     if (vcpu == endptr) {
         if (strcmp(vcpu, "all")) {
             fprintf(stderr, "Error: Invalid argument.\n");
-            return;
+            goto out;
         }
         vcpuid = -1;
     }
 
     if (libxl_cpu_bitmap_alloc(ctx, &cpumap, 0)) {
-        goto vcpupin_out;
+        goto out;
     }
 
     if (vcpupin_parse(cpu, &cpumap))
-        goto vcpupin_out1;
+        goto out;
+
+    if (dryrun_only) {
+        libxl_cputopology *info = libxl_get_cpu_topology(ctx, &i);
+
+        if (!info) {
+            fprintf(stderr, "libxl_list_vcpu failed.\n");
+            goto out;
+        }
+        libxl_cputopology_list_free(info, i);
+
+        fprintf(stdout, "cpumap: ");
+        print_cpumap(cpumap.map, i, stdout);
+        fprintf(stdout, "\n");
+
+        if (ferror(stdout) || fflush(stdout)) {
+            perror("stdout");
+            exit(-1);
+        }
+
+        rc = 0;
+        goto out;
+    }
 
     if (vcpuid != -1) {
         if (libxl_set_vcpuaffinity(ctx, domid, vcpuid, &cpumap) == -1) {
@@ -4567,7 +4591,7 @@ static void vcpupin(uint32_t domid, const char *vcpu, char *cpu)
     else {
         if (!(vcpuinfo = libxl_list_vcpu(ctx, domid, &nb_vcpu, &i))) {
             fprintf(stderr, "libxl_list_vcpu failed.\n");
-            goto vcpupin_out1;
+            goto out;
         }
         for (i = 0; i < nb_vcpu; i++) {
             if (libxl_set_vcpuaffinity(ctx, domid, vcpuinfo[i].vcpuid,
@@ -4578,10 +4602,11 @@ static void vcpupin(uint32_t domid, const char *vcpu, char *cpu)
         }
         libxl_vcpuinfo_list_free(vcpuinfo, nb_vcpu);
     }
-  vcpupin_out1:
+
+    rc = 0;
+ out:
     libxl_bitmap_dispose(&cpumap);
-  vcpupin_out:
-    ;
+    return rc;
 }
 
 int main_vcpupin(int argc, char **argv)
@@ -4592,8 +4617,7 @@ int main_vcpupin(int argc, char **argv)
         /* No options */
     }
 
-    vcpupin(find_domain(argv[optind]), argv[optind+1] , argv[optind+2]);
-    return 0;
+    return vcpupin(find_domain(argv[optind]), argv[optind+1] , argv[optind+2]);
 }
 
 static void vcpuset(uint32_t domid, const char* nr_vcpus, int check_host)
tools/libxl/xl_cmdtable.c +1 -1
index 326a660..d3dcbf0 100644
@@ -211,7 +211,7 @@ struct cmd_spec cmd_table[] = {
       "[Domain, ...]",
     },
     { "vcpu-pin",
-      &main_vcpupin, 0, 1,
+      &main_vcpupin, 1, 1,
       "Set which CPUs a VCPU can use",
       "<Domain> <VCPU|all> <CPUs|all>",
     },
#11 lore raw

Re: [PATCH v2 4/5] xl: implement and enable dryrun mode for `xl vcpu-pin'

Quoted 1 line · Dario Faggioli

As it can be useful to see whetehr the outcome of some complex

"whether", though "if" is a better word choice.

Quoted 134 lines

vCPU pinning bitmap specification looks as expected.

This also allow for the introduction of some automatic testing and verification for the bitmap parsing code, as it happens already in check-xl-disk-parse and check-xl-vif-parse.

In particular, to make the above possible, this commit also changes the implementation of the vcpu-pin command so that, instead of always returning 0, it returns an error if the parsing fails.

---
 tools/libxl/xl_cmdimpl.c  |   46 ++++++++++++++++++++++++++++++++++-----------
 tools/libxl/xl_cmdtable.c |    2 +-
 2 files changed, 36 insertions(+), 12 deletions(-)
tools/libxl/xl_cmdimpl.c +35 -11
index da6a6df..eb99231 100644
@@ -4534,30 +4534,54 @@ int main_vcpulist(int argc, char **argv)
     return 0;
 }
 
-static void vcpupin(uint32_t domid, const char *vcpu, char *cpu)
+static int vcpupin(uint32_t domid, const char *vcpu, char *cpu)
 {
     libxl_vcpuinfo *vcpuinfo;
     libxl_bitmap cpumap;
 
     uint32_t vcpuid;
     char *endptr;
-    int i, nb_vcpu;
+    int i, nb_vcpu, rc = -1;
+
+    libxl_bitmap_init(&cpumap);
 
     vcpuid = strtoul(vcpu, &endptr, 10);
     if (vcpu == endptr) {
         if (strcmp(vcpu, "all")) {
             fprintf(stderr, "Error: Invalid argument.\n");
-            return;
+            goto out;
         }
         vcpuid = -1;
     }
 
     if (libxl_cpu_bitmap_alloc(ctx, &cpumap, 0)) {
-        goto vcpupin_out;
+        goto out;
     }
 
     if (vcpupin_parse(cpu, &cpumap))
-        goto vcpupin_out1;
+        goto out;
+
+    if (dryrun_only) {
+        libxl_cputopology *info = libxl_get_cpu_topology(ctx, &i);
+
+        if (!info) {
+            fprintf(stderr, "libxl_list_vcpu failed.\n");
+            goto out;
+        }
+        libxl_cputopology_list_free(info, i);
+
+        fprintf(stdout, "cpumap: ");
+        print_cpumap(cpumap.map, i, stdout);
+        fprintf(stdout, "\n");
+
+        if (ferror(stdout) || fflush(stdout)) {
+            perror("stdout");
+            exit(-1);
+        }
+
+        rc = 0;
+        goto out;
+    }
 
     if (vcpuid != -1) {
         if (libxl_set_vcpuaffinity(ctx, domid, vcpuid, &cpumap) == -1) {
@@ -4567,7 +4591,7 @@ static void vcpupin(uint32_t domid, const char *vcpu, char *cpu)
     else {
         if (!(vcpuinfo = libxl_list_vcpu(ctx, domid, &nb_vcpu, &i))) {
             fprintf(stderr, "libxl_list_vcpu failed.\n");
-            goto vcpupin_out1;
+            goto out;
         }
         for (i = 0; i < nb_vcpu; i++) {
             if (libxl_set_vcpuaffinity(ctx, domid, vcpuinfo[i].vcpuid,
@@ -4578,10 +4602,11 @@ static void vcpupin(uint32_t domid, const char *vcpu, char *cpu)
         }
         libxl_vcpuinfo_list_free(vcpuinfo, nb_vcpu);
     }
-  vcpupin_out1:
+
+    rc = 0;
+ out:
     libxl_bitmap_dispose(&cpumap);
-  vcpupin_out:
-    ;
+    return rc;
 }
 
 int main_vcpupin(int argc, char **argv)
@@ -4592,8 +4617,7 @@ int main_vcpupin(int argc, char **argv)
         /* No options */
     }
 
-    vcpupin(find_domain(argv[optind]), argv[optind+1] , argv[optind+2]);
-    return 0;
+    return vcpupin(find_domain(argv[optind]), argv[optind+1] , argv[optind+2]);
 }
 
 static void vcpuset(uint32_t domid, const char* nr_vcpus, int check_host)
tools/libxl/xl_cmdtable.c +1 -1
index 326a660..d3dcbf0 100644
@@ -211,7 +211,7 @@ struct cmd_spec cmd_table[] = {
       "[Domain, ...]",
     },
     { "vcpu-pin",
-      &main_vcpupin, 0, 1,
+      &main_vcpupin, 1, 1,
       "Set which CPUs a VCPU can use",
       "<Domain> <VCPU|all> <CPUs|all>",
     },

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#12 lore raw

Re: [PATCH v2 4/5] xl: implement and enable dryrun mode for `xl vcpu-pin'

Quoted 5 lines · Matt Wilson
Quoted 1 line · Dario Faggioli

As it can be useful to see whetehr the outcome of some complex

"whether", though "if" is a better word choice.

Thanks, changed.

Regards,
Dario

Signature · 4 lines
<<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)

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

Acked-by on v2 4/5
#13 lore raw

Re: [PATCH v2 4/5] xl: implement and enable dryrun mode for `xl vcpu-pin'

In reply to Dario Faggioli

Dario Faggioli writes ("[PATCH v2 4/5] xl: implement and enable dryrun mode for `xl vcpu-pin'"):

Quoted 2 lines

As it can be useful to see whetehr the outcome of some complex vCPU pinning bitmap specification looks as expected.

#14 lore raw

PATCH v2 5/5 xl: test script for the cpumap parser (for vCPU pinning)

In reply to Dario Faggioli

This commit introduces "check-xl-vcpupin-parse" for helping verifying and debugging the (v)CPU bitmap parsing code in xl.

The script runs "xl -N vcpu-pin 0 all <some strings>" repeatedly, with various input strings, and checks that the output is as expected.

This is an example run (on a 2 NUMA nodes and 16 vCPUs host):

# ./check-xl-vcpupin-parse
WARNING: some of these tests are topology based tests.
Expect failures if the topology is not detected correctly
detected topology:  16 CPUs,  2 nodes, 8 CPUs per node
test case foo...
Testing the 'all' syntax:
test case all...
test case nodes:all...
test case all,nodes:all...
test case all,^nodes:0,all...
Testing the empty cpumap case:
test case ^0...
A few attempts of pinning to just one random cpu:
test case 15...
test case 5...
test case 4...
test case 8...
A few attempts of pinning to all but one random cpu:
test case all,^5...
test case all,^1...
test case all,^9...
test case all,^8...
A few attempts of pinning to a random range of cpus:
test case 12-15...
test case 6-14...
test case 13-14...
test case 4-11...
A few attempts of pinning to just one random node:
test case nodes:0...
test case nodes:0...
test case nodes:0...
test case nodes:1...
A few attempts of pinning to all but one random node:
test case all,^nodes:1...
test case all,^nodes:0...
test case all,^nodes:1...
test case all,^nodes:1...
A few attempts of pinning to a random range of nodes:
test case nodes:0-1...
test case nodes:0-1...
test case nodes:0-1...
test case nodes:1-1...
A few attempts of pinning to a node but excluding one random cpu:
test case nodes:1,^11...
test case nodes:1,^15...
test case nodes:1,^8...
test case nodes:0,^2...
all ok.

---
Changes from v1:
* this was not there in v1, and adding it has been requested during review.

---
 tools/libxl/check-xl-vcpupin-parse |  229 ++++++++++++++++++++++++++++++++++++
 1 file changed, 229 insertions(+)
 create mode 100755 tools/libxl/check-xl-vcpupin-parse
tools/libxl/check-xl-vcpupin-parse new file +229 -0
new file mode 100755
index 0000000..af9b8d8
@@ -0,0 +1,229 @@
+#!/bin/bash
+
+set -e
+
+if [ -x ./xl ] ; then
+    export LD_LIBRARY_PATH=.:../libxc:../xenstore:../blktap2/control
+    XL=./xl
+else
+    XL=xl
+fi
+
+fprefix=tmp.check-xl-vcpupin-parse
+
+expected () {
+    cat >$fprefix.expected
+}
+
+failures=0
+
+one () {
+    expected_rc=$1; shift
+    printf "test case %s...\n" "$*"
+    set +e
+    ${XL} -N vcpu-pin 0 all "$@" </dev/null >$fprefix.actual 2>/dev/null
+    actual_rc=$?
+    diff -u $fprefix.expected $fprefix.actual
+    diff_rc=$?
+    set -e
+    if [ $actual_rc != $expected_rc ] || [ $diff_rc != 0 ]; then
+        echo >&2 "test case \`$*' failed ($actual_rc $diff_rc)"
+        failures=$(( $failures + 1 ))
+    fi
+}
+
+complete () {
+    if [ "$failures" = 0 ]; then
+        echo all ok.; exit 0
+    else
+        echo "$failures tests failed."; exit 1
+    fi
+}
+
+e=255
+
+
+#---------- test data ----------
+#
+
+echo "WARNING: some of these tests are topology based tests."
+echo "Expect failures if the topology is not detected correctly"
+nr_cpus=`xl info | grep nr_cpus | cut -f2 -d':'`
+nr_nodes=`xl info | grep nr_nodes | cut -f2 -d':'`
+nr_cpus_per_node=`xl info -n | sed '/cpu:/,/numa_info/!d' | head -n -1 | \
+    awk '{print $4}' | uniq -c | tail -1 | awk '{print $1}'`
+echo "detected topology: $nr_cpus CPUs, $nr_nodes nodes, $nr_cpus_per_node CPUs per node"
+
+expected </dev/null
+one $e foo
+
+echo "Testing the 'all' syntax:"
+expected <<END
+cpumap: any cpu
+END
+one 0 all
+one 0 nodes:all
+one 0 all,nodes:all
+one 0 all,^nodes:0,all
+
+echo "Testing the empty cpumap case:"
+if [ $nr_cpus -gt 1 ]; then
+    expected <<END
+cpumap: none
+END
+    one 0 ^0
+fi
+
+echo "A few attempts of pinning to just one random cpu:"
+if [ $nr_cpus -gt 1 ]; then
+    for i in `seq 0 3`; do
+        cpu=$(($RANDOM % nr_cpus))
+        expected <<END
+cpumap: $cpu
+END
+        one 0 $cpu
+        sleep 1    # to trick $RANDOM
+    done
+fi
+
+echo "A few attempts of pinning to all but one random cpu:"
+if [ $nr_cpus -gt 2 ]; then
+    for i in `seq 0 3`; do
+        cpu=$(($RANDOM % nr_cpus))
+        if [ $cpu -eq 0 ]; then
+            expected_range="1-$((nr_cpus - 1))"
+        elif [ $cpu -eq 1 ]; then
+            expected_range="0,2-$((nr_cpus - 1))"
+        elif [ $cpu -eq $((nr_cpus - 2)) ]; then
+            expected_range="0-$((cpu - 1)),$((nr_cpus - 1))"
+        elif [ $cpu -eq $((nr_cpus - 1)) ]; then
+            expected_range="0-$((nr_cpus - 2))"
+        else
+            expected_range="0-$((cpu - 1)),$((cpu + 1))-$((nr_cpus - 1))"
+        fi
+        expected <<END
+cpumap: $expected_range
+END
+        one 0 all,^$cpu
+        sleep 1    # to trick $RANDOM
+    done
+fi
+
+echo "A few attempts of pinning to a random range of cpus:"
+if [ $nr_cpus -gt 2 ]; then
+    for i in `seq 0 3`; do
+        cpua=$(($RANDOM % nr_cpus))
+        range=$((nr_cpus - cpua))
+        cpub=$(($RANDOM % range))
+        cpubb=$((cpua + cpub))
+        if [ $cpua -eq $cpubb ]; then
+            expected_range="$cpua"
+        else
+            expected_range="$cpua-$cpubb"
+        fi
+        expected <<END
+cpumap: $expected_range
+END
+        one 0 $expected_range
+        sleep 1    # to trick $RANDOM
+    done
+fi
+
+echo "A few attempts of pinning to just one random node:"
+if [ $nr_nodes -gt 1 ]; then
+    for i in `seq 0 3`; do
+        node=$(($RANDOM % nr_nodes))
+        # this assumes that the first $nr_cpus_per_node (from cpu
+        # 0 to cpu $nr_cpus_per_node-1) are assigned to the first node
+        # (node 0), the second $nr_cpus_per_node (from $nr_cpus_per_node
+        # to 2*$nr_cpus_per_node-1) are assigned to the second node (node
+        # 1), etc. Expect failures if that is not the case.
+        expected <<END
+cpumap: $((nr_cpus_per_node*node))-$((nr_cpus_per_node*(node+1)-1))
+END
+        one 0 nodes:$node
+        sleep 1    # to trick $RANDOM
+    done
+fi
+
+echo "A few attempts of pinning to all but one random node:"
+if [ $nr_nodes -gt 1 ]; then
+    for i in `seq 0 3`; do
+        node=$(($RANDOM % nr_nodes))
+        # this assumes that the first $nr_cpus_per_node (from cpu
+        # 0 to cpu $nr_cpus_per_node-1) are assigned to the first node
+        # (node 0), the second $nr_cpus_per_node (from $nr_cpus_per_node
+        # to 2*$nr_cpus_per_node-1) are assigned to the second node (node
+        # 1), etc. Expect failures if that is not the case.
+        if [ $node -eq 0 ]; then
+            expected_range="$nr_cpus_per_node-$((nr_cpus - 1))"
+        elif [ $node -eq $((nr_nodes - 1)) ]; then
+            expected_range="0-$((nr_cpus - nr_cpus_per_node - 1))"
+        else
+            expected_range="0-$((nr_cpus_per_node*node-1)),$((nr_cpus_per_node*(node+1)))-$nr_cpus"
+        fi
+        expected <<END
+cpumap: $expected_range
+END
+        one 0 all,^nodes:$node
+        sleep 1    # to trick $RANDOM
+    done
+fi
+
+echo "A few attempts of pinning to a random range of nodes:"
+if [ $nr_nodes -gt 1 ]; then
+    for i in `seq 0 3`; do
+        nodea=$(($RANDOM % nr_nodes))
+        range=$((nr_nodes - nodea))
+        nodeb=$(($RANDOM % range))
+        nodebb=$((nodea + nodeb))
+        # this assumes that the first $nr_cpus_per_node (from cpu
+        # 0 to cpu $nr_cpus_per_node-1) are assigned to the first node
+        # (node 0), the second $nr_cpus_per_node (from $nr_cpus_per_node
+        # to 2*$nr_cpus_per_node-1) are assigned to the second node (node
+        # 1), etc. Expect failures if that is not the case.
+        if [ $nodea -eq 0 ] && [ $nodebb -eq $((nr_nodes - 1)) ]; then
+            expected_range="any cpu"
+#        elif [ $nodea -eq $nodebb ]; then
+#            expected_range="$((nr_cpus_per_node*nodea))-$((nr_cpus_per_node*(nodea+1)-1))"
+        else
+            expected_range="$((nr_cpus_per_node*nodea))-$((nr_cpus_per_node*(nodebb+1) - 1))"
+        fi
+        expected <<END
+cpumap: $expected_range
+END
+        one 0 nodes:$nodea-$nodebb
+        sleep 1    # to trick $RANDOM
+    done
+fi
+
+echo "A few attempts of pinning to a node but excluding one random cpu:"
+if [ $nr_nodes -gt 1 ]; then
+    for i in `seq 0 3`; do
+        node=$(($RANDOM % nr_nodes))
+        # this assumes that the first $nr_cpus_per_node (from cpu
+        # 0 to cpu $nr_cpus_per_node-1) are assigned to the first node
+        # (node 0), the second $nr_cpus_per_node (from $nr_cpus_per_node
+        # to 2*$nr_cpus_per_node-1) are assigned to the second node (node
+        # 1), etc. Expect failures if that is not the case.
+        cpu=$(($RANDOM % nr_cpus_per_node + nr_cpus_per_node*node))
+        if [ $cpu -eq $((nr_cpus_per_node*node)) ]; then
+            expected_range="$((nr_cpus_per_node*node + 1))-$((nr_cpus_per_node*(node+1) - 1))"
+        elif [ $cpu -eq $((nr_cpus_per_node*node + 1)) ]; then
+            expected_range="$((nr_cpus_per_node*node)),$((nr_cpus_per_node*node + 2))-$((nr_cpus_per_node*(node+1) - 1))"
+        elif [ $cpu -eq $((nr_cpus_per_node*(node+1) - 2)) ]; then
+            expected_range="$((nr_cpus_per_node*node))-$((nr_cpus_per_node*(node+1) - 3)),$((nr_cpus_per_node*(node+1) - 1))"
+        elif [ $cpu -eq $((nr_cpus_per_node*(node+1) - 1)) ]; then
+            expected_range="$((nr_cpus_per_node*node))-$((nr_cpus_per_node*(node+1) - 2))"
+        else
+            expected_range="$((nr_cpus_per_node*node))-$((cpu - 1)),$((cpu + 1))-$((nr_cpus_per_node*(node+1) - 1))"
+        fi
+        expected <<END
+cpumap: $expected_range
+END
+        one 0 nodes:$node,^$cpu
+        sleep 1    # to trick $RANDOM
+    done
+fi
+
+complete
#15 lore raw

Re: [PATCH v2 5/5] xl: test script for the cpumap parser (for vCPU pinning)

Dario Faggioli writes ("[PATCH v2 5/5] xl: test script for the cpumap parser (for vCPU pinning)"):

Quoted 6 lines

This commit introduces "check-xl-vcpupin-parse" for helping verifying and debugging the (v)CPU bitmap parsing code in xl.

The script runs "xl -N vcpu-pin 0 all <some strings>" repeatedly, with various input strings, and checks that the output is as expected.

This is a nice idea. But can we please have this use the same random seed each time, and/or report the seed ? Otherwise you can get a very annoying situation where a test fails but you can't repro it...

I think it would be better, TBH, if you separated out the test generation from the execution. check-xl-vif-parse et al have the test data as an annex to the harness material, but you could have it in a separate file which you could have a script to generate.

Also the use of "sleep 1" needs to go.

Thanks,
Ian.

#16 lore raw

Re: [PATCH v2 5/5] xl: test script for the cpumap parser (for vCPU pinning)

Quoted 4 lines · Ian Jackson

Dario Faggioli writes ("[PATCH v2 5/5] xl: test script for the cpumap parser (for vCPU pinning)"):

Quoted 3 lines

This commit introduces "check-xl-vcpupin-parse" for helping verifying and debugging the (v)CPU bitmap parsing code in xl.

Quoted 8 lines
Quoted 3 lines

The script runs "xl -N vcpu-pin 0 all <some strings>" repeatedly, with various input strings, and checks that the output is as expected.

This is a nice idea. But can we please have this use the same random seed each time, and/or report the seed ? Otherwise you can get a very annoying situation where a test fails but you can't repro it...

Well, the output tells what is the cpumap that each test is trying to use, so that one can try it by hand to see what happens and/or debug. E.g., when it says:

A few attempts of pinning to all but one random cpu:
test case all,^5...

it means it's doing `xl vcpu-pin -N 0 all all,^5'.

Anyway, I think the seed thing you're suggesting is a nice feature to have there, so I'll do that.

Quoted 5 lines

I think it would be better, TBH, if you separated out the test generation from the execution. check-xl-vif-parse et al have the test data as an annex to the harness material, but you could have it in a separate file which you could have a script to generate.

Mmm... I think I see the general idea here, and I also like it, although I'm not sure I understood where you'd like the split to be done.

What I can do is to have a script (or a functioning mode for the same script, introducing some command line parameters) for generating both the test vector and the expected output and store both in a file. Then, the xl-check-foo script will read such file and, for each line, run the command and compare the result with the one stored in the file, associated with the command itself... Would that match with what you where thinking?

Quoted 2 lines

Also the use of "sleep 1" needs to go.

Ok.

Thanks and Regards,
Dario

Signature · 4 lines
<<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)

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#17 lore raw

Re: [PATCH v2 5/5] xl: test script for the cpumap parser (for vCPU pinning)

Dario Faggioli writes ("Re: [Xen-devel] [PATCH v2 5/5] xl: test script for the cpumap parser (for vCPU pinning)"):

Quoted 7 lines

What I can do is to have a script (or a functioning mode for the same script, introducing some command line parameters) for generating both the test vector and the expected output and store both in a file. Then, the xl-check-foo script will read such file and, for each line, run the command and compare the result with the one stored in the file, associated with the command itself... Would that match with what you where thinking?

Yes, precisely. And an output from the generator script should be committed in the repo.

Ian.

#18 lore raw

Re: [PATCH v2 5/5] xl: test script for the cpumap parser (for vCPU pinning)

Quoted 9 lines · Ian Jackson

Dario Faggioli writes ("Re: [Xen-devel] [PATCH v2 5/5] xl: test script for the cpumap parser (for vCPU pinning)"):

Quoted 7 lines

What I can do is to have a script (or a functioning mode for the same script, introducing some command line parameters) for generating both the test vector and the expected output and store both in a file. Then, the xl-check-foo script will read such file and, for each line, run the command and compare the result with the one stored in the file, associated with the command itself... Would that match with what you where thinking?

Quoted 3 lines

Yes, precisely. And an output from the generator script should be committed in the repo.

Ok, all done in v3, that I just posted.

Dario

Signature · 4 lines
<<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)

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#19 lore raw

Re: [PATCH v2 5/5] xl: test script for the cpumap parser (for vCPU pinning)

In reply to Ian Jackson
Quoted 7 lines · Ian Jackson

Dario Faggioli writes ("[PATCH v2 5/5] xl: test script for the cpumap parser (for vCPU pinning)"):

Quoted 6 lines

This commit introduces "check-xl-vcpupin-parse" for helping verifying and debugging the (v)CPU bitmap parsing code in xl.

The script runs "xl -N vcpu-pin 0 all <some strings>" repeatedly, with various input strings, and checks that the output is as expected.

[...]

Quoted 4 lines

I think it would be better, TBH, if you separated out the test generation from the execution. check-xl-vif-parse et al have the test data as an annex to the harness material, but you could have it in a separate file which you could have a script to generate.

Support for testing specific strings which have been reported as buggy in the past would be useful too.

#20 lore raw

Re: [PATCH v2 5/5] xl: test script for the cpumap parser (for vCPU pinning)

Quoted 8 lines · Ian Campbell
Quoted 7 lines · Ian Jackson

Dario Faggioli writes ("[PATCH v2 5/5] xl: test script for the cpumap parser (for vCPU pinning)"):

Quoted 6 lines

This commit introduces "check-xl-vcpupin-parse" for helping verifying and debugging the (v)CPU bitmap parsing code in xl.

The script runs "xl -N vcpu-pin 0 all <some strings>" repeatedly, with various input strings, and checks that the output is as expected.

Quoted 9 lines

[...]

Quoted 4 lines

I think it would be better, TBH, if you separated out the test generation from the execution. check-xl-vif-parse et al have the test data as an annex to the harness material, but you could have it in a separate file which you could have a script to generate.

Support for testing specific strings which have been reported as buggy in the past would be useful too.

Done in v3 (just posted) via passing a "-s <string>" option to the script.

Dario

Signature · 4 lines
<<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)

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#21 lore raw
In reply to Dario Faggioli
Quoted 8 lines · Dario Faggioli

Dario Faggioli (5):
xl: update the manpage about "cpus=" and NUMA node-affinity
libxl: introduce libxl_node_to_cpumap
xl: allow for node-wise specification of vcpu pinning
xl: implement and enable dryrun mode for `xl vcpu-pin'
xl: test script for the cpumap parser (for vCPU pinning)

And I of course forgot to mention that this can be found in the following git repo:

git://xenbits.xen.org/people/dariof/xen.git numa/xl-vcpupin-nodewise-v2

(numa/xl-vcpupin-nodewise-v2 is the branch).

Here's the gitweb too:

http://xenbits.xen.org/gitweb/?p=people/dariof/xen.git;a=shortlog;h=refs/heads/numa/xl-vcpupin-nodewise-v2

Regards,
Dario

Signature · 4 lines
<<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)

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel