[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 7/9] xl: enable using ranges of pCPUs when creating cpupools
On Mon, Mar 09, 2015 at 11:18:57AM +0000, Dario Faggioli wrote: [...] > > > + > > > > I suppose this is the old syntax? > > > It is. > > > I'm asking because I want to be sure we still support the old syntax. I > > think we still support the old syntax from the look of the changes below > > but I'd better get confirmation from you. > > > I also think we should, and, in fact, we do. :-) > Thanks for confirming. > > > +=item "0-3,5,^1" > > > + > > > +means that cpus 0,2,3 and 5 will be member of the cpupool. A "node:" or > > > +"nodes:" modifier can be used. E.g., "0,node:1,nodes:2-3,^10-13" means > > > +that pcpus 0, plus all the cpus of NUMA nodes 1,2,3 with the exception > > > +of cpus 10,11,12,13 will be memeber of the cpupool. > > > + > > > +=back > > > > > > If neither B<nodes> nor B<cpus> are specified only the first free cpu > > > found will be allocated in the new cpupool. > > > diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c > > > index c748ba0..e6d1234 100644 > > > --- a/tools/libxl/xl_cmdimpl.c > > > +++ b/tools/libxl/xl_cmdimpl.c > > > @@ -7163,18 +7163,29 @@ int main_cpupoolcreate(int argc, char **argv) > > > fprintf(stderr, "no free cpu found\n"); > > > goto out_cfg; > > > } > > > - } else if (!xlu_cfg_get_list(config, "cpus", &cpus, 0, 0)) { > > > + } else if (!xlu_cfg_get_list(config, "cpus", &cpus, 0, 1)) { > > > n_cpus = 0; > > > while ((buf = xlu_cfg_get_listitem(cpus, n_cpus)) != NULL) { > > > i = atoi(buf); > > > - if ((i < 0) || (i >= freemap.size * 8) || > > > - !libxl_bitmap_test(&freemap, i)) { > > > + if ((i < 0) || !libxl_bitmap_test(&freemap, i)) { > > > fprintf(stderr, "cpu %d illegal or not free\n", i); > > > goto out_cfg; > > > } > > > libxl_bitmap_set(&cpumap, i); > > > n_cpus++; > > > } > > > + } else if (!xlu_cfg_get_string(config, "cpus", &buf, 0)) { > > > + if (cpurange_parse(buf, &cpumap)) > > > > Perhaps print something to say the cpu range specified is invalid? > > > It happens already inside cpurange_parse() (well, to be precise, it's > inside update_cpumap_range() ), which is in a better position for > printing the most meaningful error messages. > > If you check any other call site of cpurange_parse(), none prints > anything on failure, exactly for that reason. OK then. Wei. > > Regards, > Dario _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |