From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andre Przywara Subject: [PATCH] xl: fix broken cpupool-numa-split (part 2) Date: Sat, 29 Jan 2011 01:35:54 +0100 Message-ID: <4D4360EA.1090807@amd.com> References: <4D41E547.5000902@amd.com> <4D426189.1030001@ts.fujitsu.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------060905000802080503040402" Return-path: In-Reply-To: <4D426189.1030001@ts.fujitsu.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Juergen Gross Cc: George Dunlap , "xen-devel@lists.xensource.com" , Ian Jackson List-Id: xen-devel@lists.xenproject.org --------------060905000802080503040402 Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: quoted-printable 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 fro= m >> 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 =3D 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=20 newly created pool). The second bug still persists, because poolid is=20 not zeroed out again after the first creation. So the second iteration=20 will try to reuse the just assigned value and abort with an error. Ian, please apply the attached patch on top of J=FCrgens one. ---------- Before the creation and population of a new CPU pool we have to clear=20 the poolid variable, which still contains the value from the previous=20 iteration. This fixes the execution of xl cpupool-numa-split on machines with more=20 than two nodes. Signed-off-by: Andre Przywara --=20 Andre Przywara AMD-Operating System Research Center (OSRC), Dresden, Germany --------------060905000802080503040402 Content-Type: text/plain; name="xl_fix_numasplit_missing_poolid_reset.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xl_fix_numasplit_missing_poolid_reset.patch" Content-Description: xl_fix_numasplit_missing_poolid_reset.patch diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c index 5af3c21..5c754fc 100644 --- a/tools/libxl/xl_cmdimpl.c +++ b/tools/libxl/xl_cmdimpl.c @@ -5800,6 +5800,7 @@ int main_cpupoolnumasplit(int argc, char **argv) snprintf(name, 15, "Pool-node%d", node); libxl_uuid_generate(&uuid); + poolid = 0; ret = -libxl_create_cpupool(&ctx, name, schedid, cpumap, &uuid, &poolid); if (ret) { fprintf(stderr, "error on creating cpupool\n"); --------------060905000802080503040402 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --------------060905000802080503040402--