Andre Przywara
2011-Jan-27 21:36 UTC
[Xen-devel] [PATCH]: xl: fix broken cpupool-numa-split
Hi, the implementation of xl cpupool-numa-split is broken. It basically deals with only one poolid, but there are two to consider: the one from the original root CPUpool, the other from the newly created one. On my machine the current output looks like: root@dosorca:/data/images# xl cpupool-numa-split libxl: error: libxl.c:2803:libxl_create_cpupool Could not create cpupool error on creating cpupool root@dosorca:/data/images# xl cpupool-list Name CPUs Sched Active Domain count Pool-node0 42 credit y 1 Pool-node1 0 credit y 0 root@dosorca:/data/images# xl cpupool-list -c Name CPU list Pool-node0 0,1,2,3,4,5,6,7,8,9,10,11,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47 Pool-node1 The patch fixes this by using two poolid variables, now it looks like: root@dosorca:/data/images# xl cpupool-numa-split root@dosorca:/data/images# xl cpupool-list Name CPUs Sched Active Domain count Pool-node0 6 credit y 1 Pool-node1 6 credit y 0 Pool-node2 6 credit y 0 Pool-node3 6 credit y 0 Pool-node4 6 credit y 0 Pool-node5 6 credit y 0 Pool-node6 6 credit y 0 Pool-node7 6 credit y 0 root@dosorca:/data/images# xl cpupool-list -c Name CPU list Pool-node0 0,1,2,3,4,5 Pool-node1 6,7,8,9,10,11 Pool-node2 12,13,14,15,16,17 Pool-node3 18,19,20,21,22,23 Pool-node4 24,25,26,27,28,29 Pool-node5 30,31,32,33,34,35 Pool-node6 36,37,38,39,40,41 Pool-node7 42,43,44,45,46,47 Please apply to Xen 4.1.0-rc Regards, Andre. Signed-off-by: Andre Przywara <andre.przywara@amd.com> -- Andre Przywara AMD-Operating System Research Center (OSRC), Dresden, Germany _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Juergen Gross
2011-Jan-28 06:26 UTC
Re: [Xen-devel] [PATCH]: xl: fix broken cpupool-numa-split
On 01/27/11 22:36, Andre Przywara wrote:> Hi, > > the implementation of xl cpupool-numa-split is broken. It basically > deals with only one poolid, but there are two to consider: the one from > the original root CPUpool, the other from the newly created one.Uhh, silly copy and paste error! I think it happened when I introduced libxl_cpupool_cpuadd_node()... The correction is much easier. The root poolid is always 0. See attached patch. Juergen -- 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
George Dunlap
2011-Jan-28 10:53 UTC
Re: [Xen-devel] [PATCH]: xl: fix broken cpupool-numa-split
On Fri, Jan 28, 2011 at 6:26 AM, Juergen Gross <juergen.gross@ts.fujitsu.com> wrote:> On 01/27/11 22:36, Andre Przywara wrote: >> >> Hi, >> >> the implementation of xl cpupool-numa-split is broken. It basically >> deals with only one poolid, but there are two to consider: the one from >> the original root CPUpool, the other from the newly created one. > > Uhh, silly copy and paste error! I think it happened when I introduced > libxl_cpupool_cpuadd_node()... > The correction is much easier. The root poolid is always 0. See attached > patch.Re patch itself: Acked-by: George Dunlap <george.dunlap@citrix.com> Re the cpupool interface: Hang on; if the root poolid is always 0, why does xc_cpupool_create() interpret a poolid of 0 as "XEN_SYSCTL_CPUPOOL_PAR_ANY"? Doesn''t that mean that if you''re trying to create a new cpupool from cpus in the root pool, that you might get cpus from other pools? If not, what''s the point of the "CPUPOOL_PAR_ANY" parsing? -George _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Juergen Gross
2011-Jan-28 11:01 UTC
Re: [Xen-devel] [PATCH]: xl: fix broken cpupool-numa-split
On 01/28/11 11:53, George Dunlap wrote:> On Fri, Jan 28, 2011 at 6:26 AM, Juergen Gross > <juergen.gross@ts.fujitsu.com> wrote: >> On 01/27/11 22:36, Andre Przywara wrote: >>> >>> Hi, >>> >>> the implementation of xl cpupool-numa-split is broken. It basically >>> deals with only one poolid, but there are two to consider: the one from >>> the original root CPUpool, the other from the newly created one. >> >> Uhh, silly copy and paste error! I think it happened when I introduced >> libxl_cpupool_cpuadd_node()... >> The correction is much easier. The root poolid is always 0. See attached >> patch. > > Re patch itself: Acked-by: George Dunlap<george.dunlap@citrix.com> > > Re the cpupool interface: > > Hang on; if the root poolid is always 0, why does xc_cpupool_create() > interpret a poolid of 0 as "XEN_SYSCTL_CPUPOOL_PAR_ANY"? Doesn''t that > mean that if you''re trying to create a new cpupool from cpus in the > root pool, that you might get cpus from other pools?No. It just creates a cpupool. As cpupool 0 is always created by the hypervisor, it can''t be created via libxc. So specifying 0 as poolid selects the next free id. The cpus are allocated later.> > If not, what''s the point of the "CPUPOOL_PAR_ANY" parsing?Perhaps you just don''t care which poolid you get? Juergen -- 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
2011-Jan-28 17:41 UTC
Re: [Xen-devel] [PATCH]: xl: fix broken cpupool-numa-split
George Dunlap writes ("Re: [Xen-devel] [PATCH]: xl: fix broken cpupool-numa-split"):> On Fri, Jan 28, 2011 at 6:26 AM, Juergen Gross > > Uhh, silly copy and paste error! I think it happened when I introduced > > libxl_cpupool_cpuadd_node()... > > The correction is much easier. The root poolid is always 0. See attached > > patch. > > Re patch itself: Acked-by: George Dunlap <george.dunlap@citrix.com>Thanks, all. Applied. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Andre Przywara
2011-Jan-29 00:35 UTC
[Xen-devel] [PATCH] xl: fix broken cpupool-numa-split (part 2)
On 01/28/2011 07:26 AM, Juergen Gross wrote:> On 01/27/11 22:36, Andre Przywara wrote: >> Hi, >> >> the implementation of xl cpupool-numa-split is broken. It basically >> deals with only one poolid, but there are two to consider: the one from >> the original root CPUpool, the other from the newly created one. > > Uhh, silly copy and paste error! I think it happened when I introduced > libxl_cpupool_cpuadd_node()... > The correction is much easier. The root poolid is always 0.Why do you save this value then? poolid = poolinfo[0].poolid; Reading this made me think it can be an arbitrary value.> See attached patch.Easier, but that only solves one part of the problem (not populating the newly created pool). The second bug still persists, because poolid is not zeroed out again after the first creation. So the second iteration will try to reuse the just assigned value and abort with an error. Ian, please apply the attached patch on top of Jürgens one. ---------- Before the creation and population of a new CPU pool we have to clear the poolid variable, which still contains the value from the previous iteration. This fixes the execution of xl cpupool-numa-split on machines with more than two nodes. Signed-off-by: Andre Przywara <andre.przywara@amd.com> -- Andre Przywara AMD-Operating System Research Center (OSRC), Dresden, Germany _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Juergen Gross
2011-Jan-31 06:56 UTC
Re: [Xen-devel] [PATCH] xl: fix broken cpupool-numa-split (part 2)
On 01/29/11 01:35, Andre Przywara wrote:> On 01/28/2011 07:26 AM, Juergen Gross wrote: >> On 01/27/11 22:36, Andre Przywara wrote: >>> Hi, >>> >>> the implementation of xl cpupool-numa-split is broken. It basically >>> deals with only one poolid, but there are two to consider: the one from >>> the original root CPUpool, the other from the newly created one. >> >> Uhh, silly copy and paste error! I think it happened when I introduced >> libxl_cpupool_cpuadd_node()... >> The correction is much easier. The root poolid is always 0. > Why do you save this value then? > poolid = poolinfo[0].poolid; > Reading this made me think it can be an arbitrary value.Sorry, must be a relict...> >> See attached patch. > Easier, but that only solves one part of the problem (not populating the > newly created pool). The second bug still persists, because poolid is > not zeroed out again after the first creation. So the second iteration > will try to reuse the just assigned value and abort with an error. > > Ian, please apply the attached patch on top of Jürgens one. > > ---------- > Before the creation and population of a new CPU pool we have to clear > the poolid variable, which still contains the value from the previous > iteration. > This fixes the execution of xl cpupool-numa-split on machines with more > than two nodes. > > Signed-off-by: Andre Przywara <andre.przywara@amd.com>Acked-by: juergen.gross@ts.fujitsu.com -- 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
2011-Feb-01 19:07 UTC
Re: [Xen-devel] [PATCH] xl: fix broken cpupool-numa-split (part 2)
Juergen Gross writes ("Re: [Xen-devel] [PATCH] xl: fix broken cpupool-numa-split (part 2)"):> On 01/29/11 01:35, Andre Przywara wrote: > > Before the creation and population of a new CPU pool we have to clear > > the poolid variable, which still contains the value from the previous > > iteration. > > This fixes the execution of xl cpupool-numa-split on machines with more > > than two nodes.Applied, thanks. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Maybe Matching Threads
- [PATCH] xl: remove unimplemented -l stub for cpupool-list
- [PATCH] xl: Suppress spurious warning message for cpupool-list
- [PATCH] xl: Don't require a config file for cpupools
- [PATCH] xl cpupool-numa-split: reduce number of Dom0 vcpus
- [PATCH] libxl: fix compile error of libvirt