From: Andre Przywara <andre.przywara@amd.com>
To: Juergen Gross <juergen.gross@ts.fujitsu.com>
Cc: George Dunlap <george.dunlap@eu.citrix.com>,
"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
Ian Jackson <Ian.Jackson@eu.citrix.com>
Subject: [PATCH] xl: fix broken cpupool-numa-split (part 2)
Date: Sat, 29 Jan 2011 01:35:54 +0100 [thread overview]
Message-ID: <4D4360EA.1090807@amd.com> (raw)
In-Reply-To: <4D426189.1030001@ts.fujitsu.com>
[-- Attachment #1: Type: text/plain, Size: 1403 bytes --]
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
[-- Attachment #2: xl_fix_numasplit_missing_poolid_reset.patch --]
[-- Type: text/plain, Size: 502 bytes --]
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");
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
next prev parent reply other threads:[~2011-01-29 0:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-27 21:36 [PATCH]: xl: fix broken cpupool-numa-split Andre Przywara
2011-01-28 6:26 ` Juergen Gross
2011-01-28 10:53 ` George Dunlap
2011-01-28 11:01 ` Juergen Gross
2011-01-28 17:41 ` Ian Jackson
2011-01-29 0:35 ` Andre Przywara [this message]
2011-01-31 6:56 ` [PATCH] xl: fix broken cpupool-numa-split (part 2) Juergen Gross
2011-02-01 19:07 ` Ian Jackson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D4360EA.1090807@amd.com \
--to=andre.przywara@amd.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=george.dunlap@eu.citrix.com \
--cc=juergen.gross@ts.fujitsu.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.