[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 6/9] xl: enable using ranges of pCPUs when manipulating cpupools
On Fri, Mar 06, 2015 at 06:21:42PM +0100, Dario Faggioli wrote: > in fact, right now, xl sub-commands 'cpupool-cpu-add' and > 'cpupool-cpu-remove' only accept the specification of one > pCPU to be added or removed to/from a cpupool. > > With this change, they can deal with ranges, like "4-8", > or "node:1,12-18,^14". The syntax is exactly the same one > that is supported by the 'vcpu-pin' subcommand, and > specifying just one pCPU still works, of course. > > This make things more flexible, more consistent, and also > improves error handling, as the pCPU range parsing routine > already present in xl is more reliable than just a call > to atoi(). > > Signed-off-by: Dario Faggioli <dario.faggioli@xxxxxxxxxx> > Cc: Ian Campbell <ian.campbell@xxxxxxxxxx> > Cc: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> > Cc: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx> > Cc: Wei Liu <wei.liu2@xxxxxxxxxx> > Cc: Juergen Gross <JGross@xxxxxxxx> > --- > docs/man/xl.pod.1 | 25 ++++++++++-- > tools/libxl/xl_cmdimpl.c | 94 > ++++++++++++++++++++-------------------------- > 2 files changed, 62 insertions(+), 57 deletions(-) > > diff --git a/docs/man/xl.pod.1 b/docs/man/xl.pod.1 > index c330016..ef0d763 100644 > --- a/docs/man/xl.pod.1 > +++ b/docs/man/xl.pod.1 > @@ -1147,13 +1147,30 @@ This is possible only if no domain is active in the > cpu-pool. > > Renames a cpu-pool to I<newname>. > > -=item B<cpupool-cpu-add> I<cpu-pool> I<cpu-nr|node:node-nr> > +=item B<cpupool-cpu-add> I<cpu-pool> I<cpus|node:nodes> > > -Adds a cpu or all cpus of a numa node to a cpu-pool. > +Adds I<cpus> or full NUMA I<nodes> to I<cpu-pool>. pCPUs and NUMA nodes ^^^^ You can also specify some cpus inside a NUMA node. > +can be specified as single pCPU/node IDs or as ranges. > > -=item B<cpupool-cpu-remove> I<cpu-nr|node:node-nr> > +For example: > + > + (a) xl cpupool-cpu-add mypool 4 > + (b) xl cpupool-cpu-add mypool 1,5,10-16,^13 > + (c) xl cpupool-cpu-add mypool node:0,nodes:2-3,^10-12,8 > + > +means adding pCPU 4 to mypool, in (a); adding pCPUs 1,5,10,11,12,14,15 > +and 16, in (b); and adding all the pCPUs of NUMA nodes 0, 2 and 3, > +plus pCPU 8, but keeping out pCPUs 10,11,12, in (c). > + > +All the specified pCPUs that can be added to the cpupool will be added > +to it. If some pCPU can't (e.g., because they're already part of another > +cpupool), an error is reported about each one of them. > + > +=item B<cpupool-cpu-remove> I<cpus|node:nodes> > > -Removes a cpu or all cpus of a numa node from a cpu-pool. > +Removes I<cpus> or full NUMA I<nodes> from I<cpu-pool>. pCPUs and NUMA Ditto. > +nodes can be specified as single pCPU/node IDs or as ranges, using the > +exact same syntax as in B<cpupool-cpu-add> above. > > =item B<cpupool-migrate> I<domain> I<cpu-pool> > The changes look good to me. Wei. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |