Juergen Gross
2010-Dec-09 10:51 UTC
[Xen-devel] [PATCH 0 of 5] support of NUMA topology in xl
Patch 1 adds a libxl function to retireve topology information from hypervisor Patch 2 adds support of -n option to xl info Patch 3 adds possibility to specify complete nodes instead of cpus for cpupools Patch 4 adds possibility to rename a cpupool (libxl and xl command) Patch 5 adds a new xl command cpupool-numa-split to create one cpupool per numa node 9 files changed, 536 insertions(+), 21 deletions(-) tools/libxl/libxl.c | 167 ++++++++++++++++++++ tools/libxl/libxl.h | 11 + tools/libxl/libxl.idl | 7 tools/libxl/libxl_utils.c | 28 +++ tools/libxl/libxl_utils.h | 2 tools/libxl/xl.h | 2 tools/libxl/xl_cmdimpl.c | 300 +++++++++++++++++++++++++++++++++++-- tools/libxl/xl_cmdtable.c | 16 + tools/python/xen/lowlevel/xl/xl.c | 24 ++ _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Juergen Gross
2010-Dec-09 10:51 UTC
[Xen-devel] [PATCH 1 of 5] Support getting topology info in libxl
Added new function libxl_get_topologyinfo() to obtain this information from hypervisor. Signed-off-by: juergen.gross@ts.fujitsu.com 6 files changed, 118 insertions(+) tools/libxl/libxl.c | 53 +++++++++++++++++++++++++++++++++++++ tools/libxl/libxl.h | 8 +++++ tools/libxl/libxl.idl | 7 ++++ tools/libxl/libxl_utils.c | 24 ++++++++++++++++ tools/libxl/libxl_utils.h | 2 + tools/python/xen/lowlevel/xl/xl.c | 24 ++++++++++++++++ _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Juergen Gross
2010-Dec-09 10:51 UTC
[Xen-devel] [PATCH 2 of 5] support topolgy info in xl info
Adds option -n/--numa to xl info command to print topology information. No numa information up to now, as I''ve no machine which will give this info via xm info (could be a bug in xm, however). Signed-off-by: juergen.gross@ts.fujitsu.com 2 files changed, 50 insertions(+), 11 deletions(-) tools/libxl/xl_cmdimpl.c | 59 +++++++++++++++++++++++++++++++++++++-------- tools/libxl/xl_cmdtable.c | 2 - _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Juergen Gross
2010-Dec-09 10:51 UTC
[Xen-devel] [PATCH 3 of 5] Extend cpupools to support numa
The user interfaces for cpupools are extended to support numa machines: - xl cpupool-create supports now specifying a node list instead of a cpu list. The new cpupool will be created with all free cpus of the specified numa nodes. - xl cpupool-cpu-remove and xl cpupool-cpu-add can take a node number instead of a cpu number. Using ''node:1'' for the cpu parameter will, depending on the operation, either remove all cpus of node 1 in the specified cpupool, or add all free cpus of node 1 to the cpupool. libxl is extended with the following functions to support this feature: int libxl_cpupool_cpuadd_node(libxl_ctx *ctx, uint32_t poolid, int node, int *cpus) int libxl_cpupool_cpuremove_node(libxl_ctx *ctx, uint32_t poolid, int node, int *cpus) Signed-off-by: juergen.gross@ts.fujitsu.com 4 files changed, 155 insertions(+), 8 deletions(-) tools/libxl/libxl.c | 74 ++++++++++++++++++++++++++++++++++++++++ tools/libxl/libxl.h | 2 + tools/libxl/xl_cmdimpl.c | 83 +++++++++++++++++++++++++++++++++++++++++---- tools/libxl/xl_cmdtable.c | 4 +- _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Juergen Gross
2010-Dec-09 10:51 UTC
[Xen-devel] [PATCH 4 of 5] Support renaming of cpupools
Add a new library function libxl_cpupool_rename() and a new xl command xl cpupool-rename to support renaming of cpupools. Signed-off-by: juergen.gross@ts.fujitsu.com 6 files changed, 90 insertions(+), 2 deletions(-) tools/libxl/libxl.c | 40 ++++++++++++++++++++++++++++++++++++++++ tools/libxl/libxl.h | 1 + tools/libxl/libxl_utils.c | 4 ++-- tools/libxl/xl.h | 1 + tools/libxl/xl_cmdimpl.c | 41 +++++++++++++++++++++++++++++++++++++++++ tools/libxl/xl_cmdtable.c | 5 +++++ _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Juergen Gross
2010-Dec-09 10:51 UTC
[Xen-devel] [PATCH 5 of 5] Support new xl command cpupool-numa-split
New xl command cpupool-numa-split which will create one cpupool for each numa node of the machine. Can be called only if no other cpupools than Pool 0 are defined. After creation the cpupools can be managed as usual. Signed-off-by: juergen.gross@ts.fujitsu.com 3 files changed, 123 insertions(+) tools/libxl/xl.h | 1 tools/libxl/xl_cmdimpl.c | 117 +++++++++++++++++++++++++++++++++++++++++++++ tools/libxl/xl_cmdtable.c | 5 + _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Campbell
2010-Dec-09 12:25 UTC
Re: [Xen-devel] [PATCH 4 of 5] Support renaming of cpupools
On Thu, 2010-12-09 at 10:51 +0000, Juergen Gross wrote:> > diff -r b979d430eab7 -r fc3f33c7faa7 tools/libxl/libxl.c > --- a/tools/libxl/libxl.c Thu Dec 09 11:26:37 2010 +0100 > +++ b/tools/libxl/libxl.c Thu Dec 09 11:29:25 2010 +0100 > @@ -3809,6 +3809,46 @@ out: > return rc; > } > > +int libxl_cpupool_rename(libxl_ctx *ctx, const char *name, uint32_t > poolid) > +{ > + libxl__gc gc = LIBXL_INIT_GC(ctx); > + xs_transaction_t t; > + xc_cpupoolinfo_t *info; > + int rc; > + > + info = xc_cpupool_getinfo(ctx->xch, poolid); > + if (info == NULL) > + return ERROR_NOMEM; > + > + rc = ERROR_INVAL; > + if (info->cpupool_id != poolid) > + goto out; > + > + rc = 0; > + > + for (;;) { > + t = xs_transaction_start(ctx->xsh); > + > + libxl__xs_write(&gc, t, > + libxl__sprintf(&gc, "/local/pool/%d/name", > poolid), > + "%s", name); > + > + if (xs_transaction_end(ctx->xsh, t, 0)) > + break; > + > + if (errno == EAGAIN) > + continue; > + > + rc = ERROR_FAIL; > + break; > + } > + > +out: > + xc_cpupool_infofree(ctx->xch, info);You need: libxl__free_all(&gc); _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Campbell
2010-Dec-09 12:29 UTC
Re: [Xen-devel] [PATCH 0 of 5] support of NUMA topology in xl
Other than my one comment to 4/5 and Gianni''s python issue the series looks good to me so assuming those are fixed all: Acked-by: Ian Campbell <ian.campbell@citrix.com> Thanks! On Thu, 2010-12-09 at 10:51 +0000, Juergen Gross wrote:> Patch 1 adds a libxl function to retireve topology information from hypervisor > Patch 2 adds support of -n option to xl info > Patch 3 adds possibility to specify complete nodes instead of cpus for cpupools > Patch 4 adds possibility to rename a cpupool (libxl and xl command) > Patch 5 adds a new xl command cpupool-numa-split to create one cpupool per numa node > > 9 files changed, 536 insertions(+), 21 deletions(-) > tools/libxl/libxl.c | 167 ++++++++++++++++++++ > tools/libxl/libxl.h | 11 + > tools/libxl/libxl.idl | 7 > tools/libxl/libxl_utils.c | 28 +++ > tools/libxl/libxl_utils.h | 2 > tools/libxl/xl.h | 2 > tools/libxl/xl_cmdimpl.c | 300 +++++++++++++++++++++++++++++++++++-- > tools/libxl/xl_cmdtable.c | 16 + > tools/python/xen/lowlevel/xl/xl.c | 24 ++ > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Juergen Gross
2010-Dec-09 12:39 UTC
[Xen-devel] [PATCH 0 of 5] support of NUMA topology in xl
This is V3 of my patch series to support NUMA in xl with cpupools. Patch 1 adds a libxl function to retireve topology information from hypervisor Patch 2 adds support of -n option to xl info Patch 3 adds possibility to specify complete nodes instead of cpus for cpupools Patch 4 adds possibility to rename a cpupool (libxl and xl command) Patch 5 adds a new xl command cpupool-numa-split to create one cpupool per numa node Changes since last version: - added Py_INCREF when appending Py_None to list - added libxl__free_all(&gc) in libxl_cpupool_rename() 9 files changed, 540 insertions(+), 21 deletions(-) tools/libxl/libxl.c | 170 ++++++++++++++++++++ tools/libxl/libxl.h | 11 + tools/libxl/libxl.idl | 7 tools/libxl/libxl_utils.c | 28 +++ tools/libxl/libxl_utils.h | 2 tools/libxl/xl.h | 2 tools/libxl/xl_cmdimpl.c | 300 +++++++++++++++++++++++++++++++++++-- tools/libxl/xl_cmdtable.c | 16 + tools/python/xen/lowlevel/xl/xl.c | 25 +++ _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Juergen Gross
2010-Dec-09 12:39 UTC
[Xen-devel] [PATCH 1 of 5] Support getting topology info in libxl
Added new function libxl_get_topologyinfo() to obtain this information from hypervisor. Signed-off-by: juergen.gross@ts.fujitsu.com 6 files changed, 119 insertions(+) tools/libxl/libxl.c | 53 +++++++++++++++++++++++++++++++++++++ tools/libxl/libxl.h | 8 +++++ tools/libxl/libxl.idl | 7 ++++ tools/libxl/libxl_utils.c | 24 ++++++++++++++++ tools/libxl/libxl_utils.h | 2 + tools/python/xen/lowlevel/xl/xl.c | 25 +++++++++++++++++ _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Juergen Gross
2010-Dec-09 12:39 UTC
[Xen-devel] [PATCH 2 of 5] support topolgy info in xl info
Adds option -n/--numa to xl info command to print topology information. No numa information up to now, as I''ve no machine which will give this info via xm info (could be a bug in xm, however). Signed-off-by: juergen.gross@ts.fujitsu.com 2 files changed, 50 insertions(+), 11 deletions(-) tools/libxl/xl_cmdimpl.c | 59 +++++++++++++++++++++++++++++++++++++-------- tools/libxl/xl_cmdtable.c | 2 - _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Juergen Gross
2010-Dec-09 12:39 UTC
[Xen-devel] [PATCH 3 of 5] Extend cpupools to support numa
The user interfaces for cpupools are extended to support numa machines: - xl cpupool-create supports now specifying a node list instead of a cpu list. The new cpupool will be created with all free cpus of the specified numa nodes. - xl cpupool-cpu-remove and xl cpupool-cpu-add can take a node number instead of a cpu number. Using ''node:1'' for the cpu parameter will, depending on the operation, either remove all cpus of node 1 in the specified cpupool, or add all free cpus of node 1 to the cpupool. libxl is extended with the following functions to support this feature: int libxl_cpupool_cpuadd_node(libxl_ctx *ctx, uint32_t poolid, int node, int *cpus) int libxl_cpupool_cpuremove_node(libxl_ctx *ctx, uint32_t poolid, int node, int *cpus) Signed-off-by: juergen.gross@ts.fujitsu.com 4 files changed, 155 insertions(+), 8 deletions(-) tools/libxl/libxl.c | 74 ++++++++++++++++++++++++++++++++++++++++ tools/libxl/libxl.h | 2 + tools/libxl/xl_cmdimpl.c | 83 +++++++++++++++++++++++++++++++++++++++++---- tools/libxl/xl_cmdtable.c | 4 +- _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Juergen Gross
2010-Dec-09 12:39 UTC
[Xen-devel] [PATCH 4 of 5] Support renaming of cpupools
Add a new library function libxl_cpupool_rename() and a new xl command xl cpupool-rename to support renaming of cpupools. Signed-off-by: juergen.gross@ts.fujitsu.com 6 files changed, 93 insertions(+), 2 deletions(-) tools/libxl/libxl.c | 43 +++++++++++++++++++++++++++++++++++++++++++ tools/libxl/libxl.h | 1 + tools/libxl/libxl_utils.c | 4 ++-- tools/libxl/xl.h | 1 + tools/libxl/xl_cmdimpl.c | 41 +++++++++++++++++++++++++++++++++++++++++ tools/libxl/xl_cmdtable.c | 5 +++++ _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Juergen Gross
2010-Dec-09 12:39 UTC
[Xen-devel] [PATCH 5 of 5] Support new xl command cpupool-numa-split
New xl command cpupool-numa-split which will create one cpupool for each numa node of the machine. Can be called only if no other cpupools than Pool 0 are defined. After creation the cpupools can be managed as usual. Signed-off-by: juergen.gross@ts.fujitsu.com 3 files changed, 123 insertions(+) tools/libxl/xl.h | 1 tools/libxl/xl_cmdimpl.c | 117 +++++++++++++++++++++++++++++++++++++++++++++ tools/libxl/xl_cmdtable.c | 5 + _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Gianni Tedesco
2010-Dec-09 13:11 UTC
Re: [Xen-devel] [PATCH 1 of 5] Support getting topology info in libxl
On Thu, 2010-12-09 at 12:39 +0000, Juergen Gross wrote:> > +PyObject *attrib__libxl_cpuarray_get(libxl_cpuarray *pptr) > +{ > + PyObject *list = NULL; > + int i; > + > + list = PyList_New(0); > + for (i = 0; i < pptr->entries; i++) { > + if (pptr->array[i] == LIBXL_CPUARRAY_INVALID_ENTRY) { > + PyList_Append(list, Py_None); > + Py_INCREF(Py_None);Actually I think I am the one who is confused. It is the other way around. I need to fix other places that leak references due to this. IOW, this was good to go first time around, tried to respond earlier but my mail client barfed the message. Sorry for the noise! :( Gianni _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Juergen Gross
2010-Dec-09 13:19 UTC
Re: [Xen-devel] [PATCH 1 of 5] Support getting topology info in libxl
Ian, could you take my previous version of this patch (1 of 5), or would you like me to send another complete patch series? Juergen On 12/09/10 14:11, Gianni Tedesco wrote:> On Thu, 2010-12-09 at 12:39 +0000, Juergen Gross wrote: >> >> +PyObject *attrib__libxl_cpuarray_get(libxl_cpuarray *pptr) >> +{ >> + PyObject *list = NULL; >> + int i; >> + >> + list = PyList_New(0); >> + for (i = 0; i< pptr->entries; i++) { >> + if (pptr->array[i] == LIBXL_CPUARRAY_INVALID_ENTRY) { >> + PyList_Append(list, Py_None); >> + Py_INCREF(Py_None); > > > Actually I think I am the one who is confused. It is the other way > around. I need to fix other places that leak references due to this. > > IOW, this was good to go first time around, tried to respond earlier but > my mail client barfed the message. > > Sorry for the noise! :(-- Juergen Gross Principal Developer Operating Systems TSP ES&S SWE OS6 Telephone: +49 (0) 89 3222 2967 Fujitsu Technology Solutions e-mail: juergen.gross@ts.fujitsu.com Domagkstr. 28 Internet: ts.fujitsu.com D-80807 Muenchen Company details: ts.fujitsu.com/imprint.html _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Jackson
2010-Dec-10 17:30 UTC
Re: [Xen-devel] [PATCH 1 of 5] Support getting topology info in libxl
Juergen Gross writes ("Re: [Xen-devel] [PATCH 1 of 5] Support getting topology info in libxl"):> could you take my previous version of this patch (1 of 5), or would you like > me to send another complete patch series?I''ll take the previous version, thanks. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Juergen Gross
2010-Dec-17 06:09 UTC
Re: [Xen-devel] [PATCH 0 of 5] support of NUMA topology in xl
Ian, any reason you didn''t apply my series up to now? Did I miss any objection? Juergen On 12/09/10 13:39, Juergen Gross wrote:> This is V3 of my patch series to support NUMA in xl with cpupools. > > Patch 1 adds a libxl function to retireve topology information from hypervisor > Patch 2 adds support of -n option to xl info > Patch 3 adds possibility to specify complete nodes instead of cpus for cpupools > Patch 4 adds possibility to rename a cpupool (libxl and xl command) > Patch 5 adds a new xl command cpupool-numa-split to create one cpupool per numa node > > Changes since last version: > - added Py_INCREF when appending Py_None to list > - added libxl__free_all(&gc) in libxl_cpupool_rename() > > 9 files changed, 540 insertions(+), 21 deletions(-) > tools/libxl/libxl.c | 170 ++++++++++++++++++++ > tools/libxl/libxl.h | 11 + > tools/libxl/libxl.idl | 7 > tools/libxl/libxl_utils.c | 28 +++ > tools/libxl/libxl_utils.h | 2 > tools/libxl/xl.h | 2 > tools/libxl/xl_cmdimpl.c | 300 +++++++++++++++++++++++++++++++++++-- > tools/libxl/xl_cmdtable.c | 16 + > tools/python/xen/lowlevel/xl/xl.c | 25 +++-- Juergen Gross Principal Developer Operating Systems TSP ES&S SWE OS6 Telephone: +49 (0) 89 3222 2967 Fujitsu Technology Solutions e-mail: juergen.gross@ts.fujitsu.com Domagkstr. 28 Internet: ts.fujitsu.com D-80807 Muenchen Company details: ts.fujitsu.com/imprint.html _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Jackson
2010-Dec-17 17:46 UTC
Re: [Xen-devel] [PATCH 0 of 5] support of NUMA topology in xl
Juergen Gross writes ("Re: [Xen-devel] [PATCH 0 of 5] support of NUMA topology in xl"):> any reason you didn''t apply my series up to now? > Did I miss any objection?No, there is no problem with your series. However, our tests are failing a lot and I wanted to wait until we have a test pass and a push before dumping a lot more stuff into xen-unstable. So I''m holding off on your series as well as a few others. Keir, it would be nice if we could try to restrict stuff going into xen-unstable to obvious bugfixes, for a bit. I suggest that our rule for the end-of-December freeze should be that patches which were posted in their final form or something very like it by (say) Christmas Eve should go into 4.1, even if we have held off actually committing them until early January. Alternatively I can throw everything in now and try to fix it up later but it does make it harder to pin down what went wrong when things break. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2010-Dec-17 17:50 UTC
Re: [Xen-devel] [PATCH 0 of 5] support of NUMA topology in xl
On 17/12/2010 17:46, "Ian Jackson" <Ian.Jackson@eu.citrix.com> wrote:> Juergen Gross writes ("Re: [Xen-devel] [PATCH 0 of 5] support of NUMA topology > in xl"): >> any reason you didn''t apply my series up to now? >> Did I miss any objection? > > No, there is no problem with your series. However, our tests are > failing a lot and I wanted to wait until we have a test pass and a > push before dumping a lot more stuff into xen-unstable. > > So I''m holding off on your series as well as a few others. > > Keir, it would be nice if we could try to restrict stuff going into > xen-unstable to obvious bugfixes, for a bit. > > I suggest that our rule for the end-of-December freeze should be that > patches which were posted in their final form or something very like > it by (say) Christmas Eve should go into 4.1, even if we have held off > actually committing them until early January. > > Alternatively I can throw everything in now and try to fix it up later > but it does make it harder to pin down what went wrong when things > break.That sounds okay. I have nothing in my queue to be applied now anyway. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Wei Huang
2010-Dec-17 21:42 UTC
[Xen-devel] [PATCH] xl: fix compilation warning on libxl.c
This patch fixes a compilation warning (uninitialized parameter before use) on libxl.c. Xen failed to compile without it. The warning was reported on gcc 4.1.2. Signed-off-by: Wei Huang <wei.huang2@amd.com> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Jackson
2010-Dec-23 16:02 UTC
Re: [Xen-devel] [PATCH 1 of 5] Support getting topology info in libxl
Juergen Gross writes ("[Xen-devel] [PATCH 1 of 5] Support getting topology info in libxl"):> Added new function libxl_get_topologyinfo() to obtain this information from > hypervisor.Thanks, I''ve applied this version (Thu, 09 Dec 2010 10:56:35 GMT) of patch 1, and the latest version (Thu, 09 Dec 2010 12:49:22 GMT etc.) of 2-5. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Jackson
2011-Jan-05 23:39 UTC
Re: [Xen-devel] [PATCH] xl: fix compilation warning on libxl.c [and 2 more messages]
Wei Huang writes ("[Xen-devel] [PATCH] xl: fix compilation warning on libxl.c"):> This patch fixes a compilation warning (uninitialized parameter before > use) on libxl.c. Xen failed to compile without it. The warning was > reported on gcc 4.1.2.Zhang, Yang Z writes ("[Xen-devel] [PATCH] fix build error in libxl"):> Move free(disks) into the bracket, or it will show error ''disks'' used uninitialized when build libxl.Thanks. I have applied Yang Z Zhang''s patch. Yang, since your patch was only one line I applied it anyway, but in future could you please provide a Signed-Off-By, confirming the copyright status according to the Developer''s Certificate of Origin ? Thanks, Ian.>From Documentation/SubmittingPatches in the Linux kernel tree:Developer''s Certificate of Origin 1.1 By making a contribution to this project, I certify that: (a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or (b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or (c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it. (d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. -- _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel